Posts

Showing posts from July, 2013

deployment - Android Gradle Build Variant Deploy -

I have finished installing build variants with Grad in Android Studio What is this for a specific demo / pro setup? Ashish I am able to fix my 'Demo Debug' app perfectly. When I switch to 'proDebug' and 'run' with the same configuration, this pro app installs fine, but it starts crashing: start: int {act = android. Intent.action.MAIN cat = [Android.intent.category.LAUNCHER] cmp = com.anthonymandra.rawdroidpro / com.anthonymandra.rawdroid.RawDroid} Error type 3 error: activity class {com.anthonymandra.rawdroidpro / com .anthonymandra.rawdroid.RawDroid} does not exist. If I go to the dashboard then I can launch a pro version and It works according to the expectations. Therefore, the installed version works for the appropriate version; only something in the wrong (on Pro). build.gradle Flavors: ProductFlavors {Demo {PackageName "com.anthonymandra.rawdroid"} pro {packageName "com .anthonymandra.rawdroidpro"} proAmazon {packageNam...

how to resolve the error while using Scanner class in java -

I have created a class "mine" in which I'm taking input from the user using the scanner class. " > import java.util.Scanner; square mine {public static zero main (string [] args) {int val; scanner sc = new scanner (System.in); System.out.println ("any Do not enter = "); Val = sc.nextInt (); System.out.println (" number "+ val);}} but I'm getting the following errors: My.java:1: Can not resolve symbols: square scan Location: Package usage import java.util.Scanner; My.java:8: Can not resolve symbol symbol: square scanner location: package usage java.util.Scanner scanner = new java.util.Scanner (System.in); My.java:8: Can not resolve symbol symbol: square scanner location: package usage java.util.Scanner scanner = new java.util.Scanner (System.in); import java.util.Scanner; ` You can name your scanner Can keep scans but to change the `scanner` in the body of your code `java.util.Scanner` does not need to call the impo...

r - How to read a csv but separating only at first two comma separators? -

I have a CSV file I want to read the file in R, but only use the first 2 commas, i.e. There is one such row in the file, 1,1000, I did it with you Wants to do with three pillars & gt; Df & lt; - data.frame ("id" = "1", "calculation" = "1000", "comment" = "I, done with you") & gt; DF ID comment 1 1 1000 I, with regular expressions will be working. For example, it seems that there are str lines that you want to recognize here that your CSV file appears 1, 1000, I, with you 2,500, I do not know If you want to read from the file, just like the str , the file as the character vector in R To read all the rows of, call readLines () . The technique is very simple I use the {stringr} package to match the text and the information I need is used to remove it. str & lt; - c ("1,1000, I have done, with you", "2,500, I do not know") Library (stringer) # String pattern...

parsing - Calculating FOLLOW() or propagate? -

I'm a little confused about the LookAHead computing for the LLRR (1) parser. In the book, "Parsing Techniques - A Practical Guide", they say that the promotional lookhead (+ voluntarily generated lookheads) is equal to the calculation of the variable (), then why is the LALR (1) Parser (according to the Dragon Book) uses the promotion / seamless technique at all, if it can be done first () and follow, which is simple and easy to do? If this is not the case, what is the difference between two techniques? In a very brief, look-aligned set in LLLR (1) is only a subset of the following () . And it is calculated by the promotional technique.

c++ - Why does it gives segmentation fault in cilk, I am using ICC compiler -

I'm new to programming in cilk. I'm trying to multiply the block matrix using cilk. But for some reason I have got a division fault. Can you please help me? zero cilk_vec_mmm (int m, int n, int p, float a [m] [1000], float b [p] [1000], float c [m] [1000]) { Int s = 50; {For (int i = 0; i & lt; m; i + = s) {for (int j = 0; j & lt; p; j + = s) {for (int k = 0; k & lt; N [k: k + s] {c [i: i + (s-1)] [j: j + (s-1)] + = a [i: i + s-1] [k: k + s- 1] * b [k: k + s-1] [j: j + s 1]; }}}}}} Subscript are incorrect in Silk Plus, [M: N] Means the subscript M, M + 1, M + 2, ... M + N -1, which is different from the same (M: N) notation in Forter 9.

hbase - Sqoop Installation with hadoop 2.2.0? -

I am trying to install all Apache homepage components in my system. I had installed the Thup-20.0, Hive-1.0.1.0, Pig-1.0.1.0.0, HBS-1.0.9.0.0, now it is time to install sqoop. So please suggest me the installation steps of sqoop which is compatible with Haup-20.0 and HBS. Thanks for the reply early in advance for the answer. @Navin: The link you provided is for the SQO2. This is not specifically for the Hadoop 2.0 branch. Originally by changing it, design for client server model (i.e., the ease of use, ease of use, ease of use, security). For more information, find this interesting video for sqoop2 @. We use the latest Squeeze (version 1.4.4 (compiled library for Thoop 2.0) or 1.4.5) ASF. Simply download the correct version of SQL for the BOOTO 2.0 branch. For example SQL-1.4.5bib.hdop-2.0.4-alpha. With Hadoop 2.0+ versions, any problem can be downloaded and used. If you have sqoop version (I think you are using versions prior to 1.4.4) from SQAP version to Hadoop2.0 +, ...

java - Images are not showing in pdf created using velocity template -

I create PDF through Velocity template template, but I can not put images in PDF. I am adding the URL to the reference object and accessing that object in the eot.vm file, the URL is going well, but still images are not being displayed in PDF. Thanks & amp; Regards, Tushar Make sure the URL you are passing is IMAGE Sending response is not a full html page. I was passing the URL which was sending me a complete html page, so I am unable to see the images. But now it is decided. Please visit the following link:

postgresql - How do we perform the following task in crosstab? -

ProductSales तालिका का उदाहरण। - टेबल बनायें टेबल उत्पादकल्स (देश varchar (20), विक्रेता Varchar (20), राशि पूर्णांक) - उत्पाद के मूल्यों ('यूके', 'सैम', 25000) में उत्पादों के दामों को सम्मिलित करें; ... ... - पीओवीपी ऑपरेटर का उपयोग करने के बजाय plpgsql में "crosstab" में प्रदर्शन करने के लिए प्रश्न। उत्पादक धुएं से ब्रिटेन, यू.एस., यूएई का चयन करें - मुझे पता है कि यह देश में ([यूके], [यूएस], [संयुक्त अरब अमीरात]) के लिए plpgsql (राशि (राशि) में काम नहीं करेगा) पीटी एक crosstab बनाने के लिए आप PostgreSQL के साथ आने वाले मॉड्यूल का उपयोग कर सकते हैं। आपको इसे स्थापित करने के लिए पहले की आवश्यकता है (यह करने का तरीका उस पर निर्भर करेगा कि आपने PostgreSQL कैसे इंस्टॉल किया है), और उसके बाद एक्सटेंशन बनाते हैं: एक्सटेन्सियन टेबलफ़न्क बनाएं; उस जगह के साथ, आप अपना crosstab क्वेरी सरल कर सकते हैं: का चयन करें * crosstab से ($$ / * अपने खुद के फिल्टर के साथ आपकी सामान्य क्वेरी (फ़ील्ड हमेशा उसी क्रम में होनी चाहिए) * / SELECT सेल्समैन, ...

xslt - Sum function in XSL -

itemprop = "text"> My input XML is below: XSL: & lt; XSL: Template Match = "/ LogiusInhouse" & gt; & Lt; Xsl: Select the value = "stomach (zodiac (qty9 [type = '90 '] / value) div 1000" /> & Lt; / XSL: Templates & gt; My problem is that afterthat it has to be divided by 1000 but iam not getting result. Please do i need to get the full amount of help on this. & lt; XSL: Or, you can use it stylesheet xmlns: XSL = "http: //www.w3.org/1999/XSL/ Transform "version =" 1.0 "& gt; & Lt; Xsl: output method = "text" indent = "yes" /> & Lt; Xsl: Template Match = "/ Logius Inhouse" & gt; & Lt; Xsl: Select the value = "yoga (qty9 / value)" /> & Lt; / XSL: Templates & gt; & Lt; / XSL: stylesheet & gt;

android - store,then send the image from camera to other activity -

There are three options for displaying the Hello photo in another activity Option One Memory Card, Camera, Horizontal of Images list View. Whatever the user can choose from this, but the image should be displayed in the next activity image view. Please guide me for further !! Just open the camera and memory card and after that I do not know how to send this next activity. Actually, you need to pass the image information for the next activity of intent. You should use it: intent = intent (new activity); first activity, second activity.); Intent.putExtra ("file name", "SEE_BELOW"); StartActivity; Option A: If you are using an image from the SDCard - replace the SEE_BELOW with the actual string of the image path. Option B: Use the on2selected method in arg2 to get the selected position in the list - from the list list you're getting the image and Drag the image from there, save it in the SD, and send the string path like in the option A. Option C: If y...

mule - Create api using mulesoft studio -

How do I create a simple API using mulesoft stodio? I am using MySql database and am trying to create a REST API and follow this tutorial. Error while executing the graph while facing error: Error (com.mulesoft.mule.module.datamapper.api.exception.DataMapperExecutionException). Message payload is of type: ArrayList "post-text" itemprop = "text"> You have something wrong with the definitions in your datamaker, possibly due to a mismatch between MySQL data And check the data types for the fields in your datamap, their data types, the complete error message in the true studio, and logger output between the MySQL component and the datamap. If you have a configuration similar to the example in the tutorial.

How to delete all text files from given directory in c++ -

I am trying to determine how to delete all the text files from the given directory. I am using Visual C ++ 2010 Express using Vijapi. I know how to delete the file, if you know the exact name of that file, but I would like to delete all the text files in that directory. This is my latest attempt: Zero deleteFiles (WCHAR file []) {// WCHAR file [] is actually directory path ie C: \ user \ user / desktop \ folder \ // Characters [MAX_PATH] for four characters for future tasks to charge from WCHAR; Int i; (Int i = 0; file [i]! = '\ 0'; i ++) {// cycle through the array through each letter and place it in the new array file [i] = file [i]; } // Keep blank characters in the end file [i] = '\ 0'; // generated WIN32_FIND_DATA straight and FindFirstFile () WIN32_FIND_DATA fileData; FindFirstFile (file, and file data); // Display the filename message box (tap, file data files, L "check", MB_OK); } The message box only shows the folder that was selected, not t...

Perl and Html5 ServerSentEvents -

I am trying to implement an event sent by the server to change AJAX long voting in my application. In Perl script, the sleeping stream is blocking. #! / Opt / lampp / bin / perl print "content-type: text / event-stream \ n \ n"; While (1) {print "Event: Server-Time \ n"; My $ time = local time (); Print "Data: $ time \ n \ n"; } This code works but, with sleep it is not working. Just Streaming Loading Content Instead of Printing HTML Snippet: & lt; Head & gt; & Lt; Script type = "text / javascript" & gt; Function invokeSSE () {var source = new eventsource ('test.pl'); Source.addEventListener ('server-time', function (e) {document.getElementById ('ticker'). InnerHTML = e.data + '' ';}, false); Source.addEventListener ('Open', function (e) {warning ('open');}, false); Source.addEventListener ('Error', function (e) {if (e.readyState == EventSource. CLOSED) {Wa...

children selector in css -

मेरे पास नेस्टेड एचटीएमएल है: & lt; div id = "feautred" & gt; & Lt; div & gt; & lt; / div & gt; & Lt; p & gt; & lt; / p & gt; & LT; ul & gt; & lt; / ul & gt; & LT; डीएल & gt; & lt; / डीएल & gt; & Lt; / div & gt; सामान्य मार्कअप के लिए मैं #featured & gt; Div लेकिन यहां केवल div ही नेस्टेड नहीं है। कुछ भी हो सकता है तो, मैं कैसे #featured & gt; ???? यहां चयनकर्ता? करना #featured & gt; * सभी आंतरिक बच्चों को मुझे चुनने की ज़रूरत नहीं होगी! मैं केवल मुख्य बच्चों के तत्वों का चयन करना चाहता हूं। आप * : # फीचर & gt; * से: सार्वभौम चयनकर्ता, एक सीएसएस योग्य नाम [CSS3NAMESPACE] के रूप में एक तारांकन ( * U + 002 ए) स्थानीय नाम के रूप में, किसी तत्व प्रकार के योग्य नाम का प्रतिनिधित्व करता है ।

search for part of a string in the mongodb documents -

मेरे पास निम्न दस्तावेजों के साथ एक संग्रह है 1. प्रश्न: "सर्वश्रेष्ठ ओएस? " 2. प्रश्न: "सर्वश्रेष्ठ मोबाइल?" 3. प्रश्न: "सबसे खराब ओएस?" अगर मैं एक स्ट्रिंग "बेस्ट" खोजता हूं तो इसके परिणामस्वरूप 1 और 2 दस्तावेजों को वापस करना होगा। .collection.find ({प्रश्न: / बेस्ट * /});

Android how to turn off gps icon after press return back button to home screen ? -

Image
I have this problem, when I want to get back home Icon GPS, to get latitude and longitude, I I'm using GPS from my app to always show off my mobile device, how can I turn it off after returning to the home screen My code. Implementation of public class doctorlocation activity LocationListener {protected LocationManager locationManager; Protected LocationListress Location Station; Protected Reference Reference; String lathes; String provider; Protected double latitude, longitude; Protected Boolean GPS_Annal, Network_Account; @ Override Protected Zero (Bundle Saved Instantstate) {Super. NET (Saved Instantstate); SetContentView (R.layout.doctorlocation); LocationManager = (LocationManager) getSystemService (event .LOCATION_SERVICE); LocationManager.requestLocationUpdates (LocationManager.GPS_PROVIDER, 0, 0, this); } @ Override location change to public spaces {location location} {// txtLat = (TextView) findViewById (R.id.textview1); //txtLat.setText ("Latitude:" + ...

python - Save the Celery task in DB- Django -

I am referring to documents I used my proj / proj Created in celery.py , as stated in the document and then __init __. __future__ import absolute_import import from cellular import from Py celery.py > Os.environment.setdefault ('DJANGO_SETTINGS_MODULE', 'proj.settings') application = celery (' proj ') from app.conf.update (' DatabaseBackend djcelery.backends.database ', CELERY_RESULT_BACKEND =) .config_from_object (' django.conf : Settings') app.autodiscover_tasks (lambda: settings.INSTALLED_APPS) __ init __ py __future__ import from absolute_import I have installed pip install django-celery , then the migrated python manage.py migrate djcelery from the Celery Import app to celery_app This has made some tables in my DB. tasks.py from the store imported_task import from __future__ import absolute_import request json @shared_task def post_notification (data, url): header = {'Content-Type': 'Applic...

c# - What is the behavior when throwing an exception without setting out parameter? -

What is defined behavior for C # when an exception is thrown before setting the value of a parameter, and then you Try to reach the parameter? Try the public zero DoSomething (int id, out control) {{int result = call (id)}; Control = new call control (result); } Hold (exception e) {new exception throw ("call fail", e); }} // Do Something else DoSomething (Control Out Control) {try {DoSomething (1, Out Control); } Hold () {// handle exception}} // control later; DoSomething (Control Out) control.Show (); The compiler usually complains about exiting the method before setting the parameter outside. It seems that it manipulates me by saving myself. defined behavior C # when an exception is thrown before setting the value of a parameter , And then you try to reach the parameter? You can not do this This variable will definitely not be definite, unless it is definitely specified before the method call. If the variable was is definitely given before the method...

file - In Python, how do I iterate over one iterator and then another? -

I want to repeat two different iterators, something like this: file1 = a / Second; open for item in second (file 1, file2) ('file1', 'r') file2 = open ('file2', 'r'): print item I expected to print all the rows of file 1, then all the lines of file2 I want something normal, as it can not be an iterator file, it's just an example I know I can do this: for item [ File1] + [file2]: But it reads both the files in memory, which I prefer to avoid from you. Usage: chain for chain in import from itertools (File 1, File 2): Pass The module also offers a similar feature: fileinput.input ['File1', 'file2']): Pass

Notice: Undefined index: index.php -

मुझे मिल रहा है नोटिस: अपरिभाषित सूचकांक: index.php xxxxx / Index.php पंक्ति 26 पर जब मैं menu.php से $ submenu चर सरणी को निकालता हूं सब कुछ ठीक काम करता है लेकिन जब मैं $ उपमेनू सरणी चर जोड़ता हूं, मुझे त्रुटि संदेश मिलता है I `मैं यहाँ क्या करने की कोशिश कर रहा हूं शीर्ष स्तर को पहले प्राप्त कर रहा है और फिर खोज लें कि क्या उनकी कोई भी बच्चे उपनुमा Index.php फ़ाइल पर मुझे यह कोड है foreach ($ मेनू $ मेनू के रूप में) {$ title = $ menu [0]; $ मुल्ये = $ मेनू [1]; $ Template = $ मेनू [2]; $ वर्ग = $ मेनू [3]; $ Id = $ मेनू [4]; $ आइकन = $ मेनू [5]; यदि (! $ शीर्षक) {$ title = 'no title';} अगर ($ वर्ग) {$ class = 'class =' ​​'। $ Class।' '' ';} Else {$ class =' ​​';} अगर ( $ Id) {$ id = 'id = "'। $ Id। '' ';} Else {$ id =' ';} अगर (! $ आइकन) {$ icon =" menu-default.png ";} गूंज '& Lt; a href = "'। $ टेम्प्लेट। '' '। $ वर्ग।' '। $ आईडी।' & Gt;...

javascript - console.log is not working in iOS Phonegap App even after adding the console plugin -

I created a phonegap iOS app in Cordoba CLI. I've added the console plugin and yes the device is called successfully but console.log is not working and does not print anything in the XCode log. Plugin installation: - Cordova-V 3.3.1-0.3.1 add sudo cordova plug-in org.apache.cordova.console Plugin is using the plugin "org.apache.cordova.console" through the registry - "org.apache Is starting to install .cordova.console "for IOS Preparation of the iOS project - org.apache.cordova.console is installed on IOS. Sudo Cordova plugins ['org.apache.cordova.console', 'org.apache.cordova.device', 'org' .apache.cordova. Dialogs ', ' org.apache.cordova.geolocation ', ' org.apache.cordova.globalization ', ' org.apache.cordova.inappbrowser ', ' Org.apache. Cordova.media ', ' org.apache.cordova.network- notification ', ' org.apache.cordova.splashscreen ', ' org.apache.cordov...

git - Download angular-ui -

It appears that the makers of angular-ui appear on a delightful dance to find the most relevant place to download Leading their JS files to anyone. I first looked towards Angular. Any clear download link Then I suggested to use something called buver? Then I saw that there was a download link from here. As a result, 404 Then I found a previous download link! Oh no, the answer contains two broken feeds! ( "It should be accompanied by code" At the end of this question, the last Bella contains a link that works. For now, I do not know if this is a legitimate mirror, b) this is the latest version. So where do you want to download this JS file? What is the official download link or do I need to use this bower thing? I think that they have obscured this process to prevent people from using it as a CDN, but in the process they have made it much more complicated than it needs. . is the old version of CDNG! Look here: I have found this: Disxioned Repo...

c# - How to Implement XEP-0012 using Jabber-net Library -

I am making a chat client in the C # Windows Application Project, I want to get the last position of a JID. How can I implement XEP-0012 (the final activity of the JID) on the Jabber-net .NET Library. Ensure that you have read, see some existing code for some examples. jabber: iq: final should be trivial to a protocol perspective, but many clients no longer apply it.

javascript - Video HTML5 / wait until Readystate === 4 then playvideo in loop -

Hello I look a little bit to find a solution, but as I'm beginning in JavaScript I am the solution to the problem : I have two videos (OGV for Firefox): & lt; Video Loop Poster = "Picture / Poster Gif" & gt; & Lt; Source src = "video / bg-4.mp4" type = "video / mp34" & gt; & Lt; Source src = "video / bg-4.ogv" type = "video / og" & gt; & Lt; / Video & gt; I want to check whether they are loaded and after the autoplay they tried it in the loop (as background video) but this does not work: function autoplay () {var v = document.getElementsByTagName ("video") [0]; If (v.readyState === 4) {v.play (); } } auto play(); Just add this attribute to the video tag: & lt; Video Loop Poster = "images / poster.gif" Autoplay & gt; & Lt; Source src = "video / bg-4.mp4" type = "video / mp34" & gt; & Lt; Source src = "video / bg-4.ogv...

single sign on - How to implement worklight server side serverSessionTimeout? -

I am attempting to implement the server server timeline in the implementation server, I have the server session timeout = 5 and sso.cleanup.taskFrequencyInSeconds = 5 is enabled in worklight.properties but there is no luck. We have user DB entry for every user login, ideally after the session reaches 5 minutes, user DB entry should be removed, but I can not clear user DB entry from server side. I appreciate it that anyone help me on this. As Iddo mentioned in the comments: Sso.cleanup.taskFrequencyInSeconds is related to a completely different feature server sessiontime directs the application server to invalidate the session after the specified server At the time, but the actual cleaning application may be at the discretion of the server ( Therefore, to control the session, After that, just separating the application handles the memory threads. Is there any special reason that after the above version you should access the database and delete its rows Also it...

ios - Dismiss a view and present a new one from within applicationDidEnterBackground -

I have an app that presents its passcode entry when the user launches the app or it comes back from the background When the user opens it from the background, the real app should not have 'flash', in other words, the security screen must be completely loaded before the user reopens the app. I have this setup ok for most screens. In a scenario it is possible for the user to call a Segue for the horizontal view controller from the tab bar controller. At that time I have some problems if I do not pop the rotated screen, the input screen comes horizontally, even if the user reopens the app in the picture .. If I If you dismiss it with the animation then the lock screen does not start to load until the app restarts, so that you can get a flash of content. If I dismiss it without animation then the lock screen still appears horizontally. > ApplicationDried Background : Tabbar Controller * TBC = (Tabbar Controller *) self.window.rootViewController; Zero (^ OpenPasso...

asp.net - What kind of datatypes should I use for the return value of a Web API method? -

I have a web API controller that gives data to my clients the code looks like this: [http gate] [action name ("retrieve")] public inenemable & lt; Reference & gt; Recover (intisID) {returns _referseva Retrieve (Topic ID); } Can anyone tell me that it is necessary to specify ActionName? In addition, should I return an IEEEMERABLE, an ILIT or something else? I assume that your ASP.NET routing setup is correct, you ActionName secure void Application_Start () {RouteTable.Routes MapHttpRoute ("0", "{controller} / {action} / {arg1} "); } match Whatever you return, Fully based on your MediaType formatter, the default of which is XmlFormatter and JsonFormatter . These can be found in the global configuration. Configuration. Formats will be selected on the basis of and the client provided by the accepted header. We, for example, use our feedback for formatting, configured by: secure void Application_Start () {Rout...

PuTTY and how to keep alive telnet session -

Image
I need to keep the telnet session alive in the cyst but I still can not understand how to do this. I have this setting: And if I just try for example: $ get / signout http / 1.1 If the check is done "Do not close the window on the result" is the inactive window and if the "Close window on check exit" is checked, the window closes after the request. But for example, I must first give something in the session on request and print it on another request which is in session. How do I set it? Thanks Keep the wrong- alive. TCP Kupalive is a feature of a TCP stack that periodically (every 4 hours is the default, if I remember correctly) sends an empty data packet, to ensure that on the other hand the connection to open end It's a network-level feature and in any case the server (or client) will not have reason to close the not connection. The HTTP has a line in the Keep-Alive request header, which requests that the server does not close the conn...

python - Pyramid Auth error with Persona / Browserid -

I want to pyramid in my app with personality or browser id, the problem is that using both of us An error The console let me drops when I use personality: import error: no module name pyramid_svador and when I My visited file Import pyramid.security from pyramid authenticated_userid #from waitress import from pyramid.response Import response from .config import configurator pyramid.security import authenticated_userid to pyramid.response import r Spirits from pyramid.config import configurators serve deferred import from pyramid.exceptions. Hello_world (request): userid = authenticated_userid (request) if userid is none: increase () return feedback ('hello% s!'% (Userid Importing import import from the import importer root import from imported import from pyramid.config to my INIT file Make pyramid_jinja2 import OS here = os.path.dirname (os.path.abspath (__ file__)) settings = {'persona.secret': 'some secret', 'personality' : ...

php - Extending twig template when both are within /app directory -

I am trying to create custom error pages in symfony2, but my site theme inside error.html.twig / There is a problem using the layout As I mentioned here: I overridden the error file and received my app / resource / twig bundle / view / Exception / error is put in html.twig . If I use static content it all works fine, but I would like to use the {% extends ':: base.html.twig'%} as I would with all other pages Yes, so I can copy my current layouts and styles. base.html.twig is located on app / resource / visual / base.html.twig . How do I go about expanding this template? Besides, just out of curiosity, is there any way to override the 'Twelve Bundle' bundle, especially without any error pages within one of my ponds? UPDATE OK, it was resolved with the help of 'Wow J'. It has been found that the file was being found, but the file which was extended It is using is_granted if it is called in the docs then by adding the app.user and if written...

for loop - Finding a certain file inside each directory in a set of directories using batch? -

This is my script. In this case I am trying to do the last file in the directory (when sorting alphabetically). Whenever I run it, the final file is given at every frequency in the 6th folder. What is wrong with this script? @echo closed cd folder1 \ folder 2 for / d %% g (*) (echo %% g for CD %% g / f %% f ('/ B / ad / on ') Do (final = %% set up)% dcho% last% cd .. pause) cd .. cd .. This works like this: Put it in your working directory and run it. $ / = $% = ~% F% for @echo off setlocal EnableDelayedExpansion for / ($ Dir / s / b / ad / on "%% a" '') % ~ XF "Echo of the last %% one! $ Is the last!) Echo finished ... Pause Edit: Make your code work For: @echo offlocal for EnableDelayedExpansion (*) in D %% G (resonance %% g CD %% G \ for / f "delims =" %% F in ( 'Dir / b) / Ad / on') Do (set to last = %%) Echo! Last! Cd .. pause) cd .. cd ..

Scala regex format match result -

मैंने एक फ़ंक्शन लिखा def extract मोबाइल नंबर: सूची [स्ट्रिंग] = {pattern.findAllIn (एस) .toList} जहां वैल पैटर्न = "[0- 9] {9}"। R जो सूची देता है [इंट] उदा इनपुट "मैडम कृपया मुझे 111111111 पर कॉल करें और 223322 पर लैंडलाइन" आउटपुट: लिस्ट [111111111] चूंकि मैं सीख रहा हूँ, मैं यह समझ नहीं पा रहा हूं कि मैं कैसे पैटर्न का उपयोग कर सकता हूं। ReplaceAllIn (s, matcher) लौटने के लिए "मैडम कृपया मुझे 111-111-111 और 223322 पर लैंडलाइन पर कॉल करें।" val input =" मैडम कृपया मुझे 111111111 पर कॉल करें और 223322 पर लैंडलाइन ":: नील वेल फोन नंबर =" (। +) ([0- 9] {3}) ([0- 9] {3}) ([0- 9] {3}) (। +) ".आर मूल्य संसाधित = input.map {केस फोन नंबर (उपसर्ग, पी 1, पी 2, पी 3, प्रत्यय) = & gt; S "$ उपसर्ग $ p1- $ p2- $ p3 $ प्रत्यय" केस s = & gt; S} प्रसंस्कृत। फोरेक (println) आउटपुट: मैडम कृपया मुझे 111-111-111 पर कॉल करें और 223322 पर लैंडलाइन कॉल करें

c# - listening for click event in a form from another thread -

OK, I have a button and a combobox form, when I load the form I start a new thread In that thread, I want to hear from the form for click event and I want to get the selected item from the cumbobox. What is the best way to go about doing this? If you click on some long-running CPU on the expensive processing button, The time when the button is clicked will recommend starting a new thread. The best way is to hear click events in the main thread, and when the event will fire - then start a new thread and pass the selected value.

Sum rows from different conditions in Mysql -

मूल तालिका बड़ी है इसलिए मैं इसे सरल कर दूंगा: mytable: एक प्रश्न के समान का चयन करें जब हालत = 1 फिर 'ठीक' या स्थिति के रूप में 'बीएडी' अंत, मामला (मामला जब आकार = 10 से 1 साल पहले 0) छोटा, मामला (मामला तब होगा जब मामला = 20 तब 1 या 0 पूर्वाह्न) मध्यम, एसयूएम (मामले में जब तो हमारे पास यह परिणाम है स्थिति छोटे मध्यम बड़े ठीक 1 2 1 बीएडी 2 1 0 प्राप्त करने के लिए उचित कोड क्या है: स्थिति छोटे मध्यम बड़े ठीक 1 2 1 बीएडी 2 1 0 कुल 3 3 1 आप को रोलअप के साथ जोड़ सकते हैं ग्रुप BY इस तरह की स्थिति: स्थिति का चयन करें जब हालत = 1 'स्थिति' के रूप में 'ठीक' या 'खराब' अंत, मामला (मामला जब = 10 फिर 1 0 अंत ) के रूप में छोटा, एसएम (मामला जब आकार = 20 तब 1 ELSE 0 ईडीडी) के रूप में मध्यम, एसएम (मामला तब होता है जब = 30 THEN 1 ELSE 0 END) बड़ा, रोबले के साथ स्थित स्थिति से मेराटेबल समूह से यह एक परिणाम सेट की तरह उत्पन्न करेगा: स्थिति छोटे मध्यम बड़ा ठीक 1 2 1 खराब 2 1 0 [NULL] 3 3 1 आपको व्यवहार को समझना होगा कि...

java - Stack and Queue (reading code) -

I want to sort this problem without putting it into Java IDE. (If it comes in an examination then I will not be able to solve it.) So what I still know I know that the stack is known as the envelope and the queue is known as FIFA, but I do not know how this code will pop out (or if I am right) public static zero main (string [] args) {line & lt; String & gt; Q = new line & lt; String & gt; (); Q.enqueue ("A"); Q.enqueue ("two"); Q.enqueue ("four"); Q.enqueue ("six"); String s = ""; Int i = 0; While (! Q.isEmpty ()) {s = s + q.dequeue () Substring (i); I ++; } STOOT Print (s); } Since this is a line, it will be fifo and the reason for the sub-object output will be: onewour? And finally I got two problems in the Princeton CS class but I do not know how the answer came. P> Suppose that a client (queue) Intermitted sequence does. The enque operation has an integer number from 0 to 9 in the order on the ...

How to Get Value of an element in a map Using Row and Column in C++? -

I want to know how to get a value from a map, in which there are two vectors using row and column strings For example, if the user enters "R1" and "C1" then the string "1" gets printed. In this code, I am using the array subscript to access the vector. Sorry if this is a repeated question. Thank you. #include & lt; String & gt; # Include & lt; Iostream & gt; #include & lt; Vector & gt; # Include & lt; Map & gt; using namespace std; Typedef Pair & lt; String, string & gt; pair; Typedef Map & lt; Pairs, string & gt; Map; Typingf vector & lt; String & gt; StrVec; Int main () {const int COL_SIZE = 3; Const int ROW_SIZE = 3; String line_arrow [ROW_SIZE] = {"R1", "R2", "R3"}; String col_array [COL_SIZE] = {"C1", "C2", "C3"}; StrVec column; StrVec line; {Row.push_back (col_array [i]) for (size_t i = 0; i & lt; COL_SIZE; ++ i); Column....

ruby on rails - Capistrano Pointing to Old Release That No Longer Exists -

I changed this question slightly based on changing circumstances. Set: rails_env "production" set: branch, "master" set: keep_releases, 1 set: App_server, set "ip address": db_server, "ip address" server ap_service ,: app,: web role: db, db_services,: primary = & gt; Set the true set: deploy_to, "/ var / www": user: cool_user set: repository, "git account" set: CMM, "GIT" set: SMM_UN name, "My username" set: scm_passphrase, "password" ssh_options [ : Forward_agent] = 'Deploy: Restart', after 'Deployment: Cleaning' 'Deployed: Update', 'Deployed: Symink' is correct after When I run Run everything looks fine in the console, not errors. But when I go to the site, it indicates an old release which is no longer present in the server For example, when I go to the Pricing page, I get this error ... Unknown action could not get 'pricing' for d...

Can I make a MySQL view that adds a random amount within a range to any decimal fields in the table? -

I created a dashboard for a company so that they decreased the number of data from their QuickBooks and they want to demo it But people without their sensitive financial data I think this would be the easiest way for me to create a new database of the main database ideas, but the figures change semi-randomly, keeping the ratio equal, the quantity is different I imagine That range will be something like between 300% and 340% in each invoice line item, for example. I have other ways to get it, but I think it will be the easiest maintenance conditions, if it is possible. If you want a data masking technique The basic strategy has been reduced by a few percent. Here is a common example without knowing anything about your data, in which 10% of the variance (RAND) gives a random value between 0 and 1) View data data (Data + (data * ((rand (.) - .5) / 5) Tab data as new data from

c# - async NamedPipeClientStream implementation feedback -

Currently, I have implemented designated pipe using a demo code instead of I instead of synchronous client; However, I want to make it asynchronous. Here's my implementation, where the main program calls StartClientNamedPipeListening: /// & lt; Summary & gt; /// buffer where received bytes or bytes have been received /// & lt; / Summary & gt; Private byte [] _byteBuffer = null; /// & lt; Summary & gt; /// Callback result for reading data from named pipes /// & lt; / Summary & gt; Private IAsyncResult _pipeResult; /// & lt; Summary & gt; /// Watchdog /// & lt; / Summary & gt; Object is designated to send and receive data from. NamedPipeClientStream _pipeClient; /// & lt; Summary & gt; /// Waiting indicates threads that an event has occurred /// & lt; / Summary & gt; Protected Manual ResetEvent _pipeReadDone = New Manual Retset (incorrect); Private object _pipestate = new object (); Private Zero StartClientNamedPi...

ruby on rails - Rank posts by comments added today -

I have two models: Posts and comments I want to rank a post by # of comments posted today. So far, I have given it a place in the number of comments and I am not sure how to add today's part. These are the post controllers: @posts = post.order ('posts.comments_count desc') I have Have tried @ posts = post.dr ('posts.comments_count desc'). Where ("created_at> =?", Time.son.new.bizening_off_de) but nothing returned. Your second query will > @posts = post. Selection (counting as 'post. *, Count (comment.id)') .Jom ((comments) where ('comments.created_at> gt; =,' time.jon.nough.bizing_off_de) .group ( 'Posts.id') .order ('count_comments desc') If you want to include all the posts that do not have any comments today, then you have a left-hand participle will be required: @posts = post.select ('post. *, Count_comments' as count (comment id) .joins ("comments.post_i...

How do I find and insert the average of multiple lines in Emacs / Elisp? -

I have a file that looks like: AT 4 AT 5.6A .a. 7.2 IG 6EG 6S2 OP3 OP 1.2 OP 40 And I want to calculate on average for some such as each title and output (I have made this average): AT 5.42EG 6S2OP32.1 The file is in order, so all the titles will be right under each other, but like a different volume headings. AT has three, but S is the only one. How do I add each of these lines, will be divided by the number of rows, and then the Emacs / elisp? Replace all lines I still try to solve this question while learning Decided yourself Elisp Perhaps there are more efficient ways to resolve this. After defining the function, you want to set the area around the score. (If the whole file, then M-& lt ;, C-SPC, M-> I thought it would be fine because your score could be in the middle of other text, my function would calculate the average and then the end of the field Answer in (Fius (make-hash-table: test 'equal')) (Answer "") (curl hook)) (...

http status code 404 - Nagios check_http failing with 404 on certain address -

I created 2 ngosos server this week, previously there was only a proof of concept, and tonight I created one . I followed the exact same instructions on both, and migrated my existing configuration to the new server tonight. Everything works perfect, except that some check_http checks are getting a 404 error, even if I can curl and even know. Example: ./check_http-I 127.0.0.1 -u http://11.210.1.18:8001/alphaweb/login.html HTTP Alert: HTTP / 1.1 404 not found - in 528 bytes 0.000 seconds response time. Time = 0.000418 S ;; 0.000000 size = 528b ;;; 0 I can curl this address with no problem but the following are successful: ./check_http-I 127.0.0.1 - U http://11.210.1.16:7001 HTTP is OK: HTTP / 1.1 200 Ok - 0.001 second second reaction time 288 bytes. Time = 0.000698 S ;; 0.000000 size = 288b ;;; 0 Both of these checks work almost entirely on the same server, any idea? Good thing is, that you get some HTTP status codes, 404 is also a good one, Because you somehow inte...

web scraping - How To Extract Page URLs From Any Website in Bulk? -

I am looking for a free solution / tool / software through which I can remove all the URL of the website I am The site has approximately 992,000 pages, so I need the URL of them all in the Excel sheet. I am using " site: mywebsite.com " and gives me 992,000 results. I know that I can make maximum results per page 100 but it's still not making my life easier, besides Google, Google will not show any results more than 1000. Tried using the Google API , but without any luck. Tried Sitemap Generator but they did not work either. You can use a crawler tool to crawl the entire website and save the URL. Free tools include: IRobotSoft :. Usage: Crawl website (source sites, kolketsk) function. Scrapy:

javascript - Add to favorites button for adding favorite html Pages -

I am creating a mobile website with different events in a specific month. I want to add a button to every event page, When the user is added individually as 'Paste', I want the user to be automatically added to an html page 'Favorites' when the user clicks the Add Favorites Button button. I would go with a little javascript, called on external and event pages (because many of its examples ). This is actually a very simple process that you are asking about. Create a new javascript file named favorite jj Save it with this code: Modified to support Opera Function bookmarks (title, url) {var spath = window.location.pathname; Var sPage = sPath.substring (spath.lastIndexOf ('/') + 1); Url = url + sPage; If (window.sidebar) // firefox window.sidebar.addPanel (title, url, ""); And if (window. Aparea & window.print) {// opera var imil = document.create element ('a'); Elem.setAttribute ('href', url); Elem.setAttribute...

linux - Why can't I print the user input data in NASM assembly? -

I am trying to verify the length of user input in this example (NASM): section .bss user_input resb section 10 .text push ebp mov ebp, esp mov eax, 3; Sys_read mov ebx, 0; Stdin mov ecx, user_input mov edx, 10 int 80h cmp eax, 10 jg overflow jmp overflow:. . . Why this work is not being done? "> Since your buffer is 10 bytes And you put length in ADX, returns can never exceed 10 and you go to label done: and exit. The code you show Nothing is printed in anything that prints.

ios - How to put line breaks on strings Objective-C -

If I have a string in Objective-C which is actually long, such as: NSString * text = [NSString stringWithFormat: @ "% @", _sometext]; How can I scan _sometext and add a line break to every hundred letter (letter) string? So if I had _sometext like it was November. Although it was not too late, when I turned to Londres Street then the sky was dark. Father had finished for the day, stopped the lights of the shop and closed the shutter; But so I will not come home in the dark which he left on the stairs with light on the flat. How can I make it so that it will bring a line break It was November. Although it was not too late, when I turned to Londres route and after that Father had finished for the day, stopped the lights of the shop and closed the shutter; But so I wo (because they were 100 characters)? But instead of closing in the middle of the word, I can leave this word and end in example in the previous word: if the sentence ends on ...

homebrew - "No available cask" error for any cask I try to install -

Well, I've updated your brew now brew-cask set a wine tap did Finj / cask after the command to set the formula again I Waygrnt on my machine brew cask install vagrant and suddenly it Popped Out: Error: No available cask for passionate No. It is trying to understand what is wrong, I have found that it has failed for any bark, nor does Sooty Constant Search work. Am I missing a step? Should not it work? My Decoction of Alcohol Doctor Output: ==> OS X version: 10.9.2 ==> Hardware Architecture: Intel-64 == & gt; Ruby version: 1.8.7-p358 == & gt; Ruby Path: / System / Library / Framework / Ruby. Framework / Version / 1.8 / usr / bin / ruby ​​== & gt; Homebrew version: 0.9.5 ==> Homebus Execution Path: / usr / local / bin / brew == & gt; Homebro seller path: / usr / local / cellar == & gt; Homebrew-cooked version: 0.32.0 == & gt; Content $ LOAD_PATH: /usr/local/Cellar/brew-cask/0.32.0/rubylib / usr / local / Library / Homebrew / u...

java - Is there a way for a JTextField in an 11x11 grid to have a background object, such as a circle or square? -

Image
यह मैंने बनाया है JTextField वस्तुओं का एक 11x11 ग्रिड है रंग हैं अच्छा, लेकिन आकृति बेहतर (या दोनों) होगी: मुझे नहीं लगता कि मौजूदा कोड को जोड़ने का कोई भी तरीका है (जैसे, .पीएनजी) एक JTextField या JPanel में, वहाँ है? मुझे क्या करना चाहिए? मैंने अभी तक ग्राफिक्स कक्षा में प्रवेश नहीं किया है और मैं नहीं चाहता था, अभी। लेकिन अगर यह एकमात्र तरीका है, ठीक है। मैं मान रहा हूं कि उपयोगकर्ता टाइपिंग में होगा प्रत्येक पाठ क्षेत्र का एक अक्षर। कुछ संभावनाएं हैं: 1) एक आइकनबॉर्डर बनाएं। यह पाठ फ़ील्ड के शीर्ष पर आपके दिए गए आइकन को चित्रित करेगा अवधारणा का सरल प्रमाण: आयात करें java.awt। *; Import java.awt.geom। *; आयात javax.swing। *; आयात javax.swing.border। *; पब्लिक क्लास आइकॉनबॉर्डर सीमा (निजी आइकन आइकन; निजी इन्सट्स सीमाएएनसेट = नयी इन्सट्स (0, 0, 0, 0); सार्वजनिक चिह्न (आइकन आइकन) {this.icon = icon; } // // बॉर्डर इंटरफ़ेस लागू करें // @ ओवरराइड पब्लिक इन्ससेट्स getBorderInsets (घटक सी) {वापसी सीमाएं; } @ ओवरराइड पब्लिक बूलियन isBorderOpaque () {वापसी झू...

c# - No table in windows phone 8 -

I want to pair the 3 string data in the table in wp8 but I know how to do this. The problem is: - I get a response from the server so I for this string of strings for example desrlaized for example string a, string b, string ci display them as line on the phone's screen When I get another response, I get the second reaction like the old wire, tie them in the new row (keep the old line) ...... to get the whole table Please help me I Saturate Has been tried sample but no data appears on the phone screen: - grid layout = new grid (); Layout. Column definitions Add (New column Definition () {width = GridLength.Auto}); Layout. Column definitions Add (new column define () {width = new grid length (50)}); Layout. Rolledfiniez Add (New Lineology () (Height = New Grid Lingti (50)}) Layout. Add Hair (New Text Block () {}); // Read the foreach of children (UIElement element in Layout.Children) {// Read line and column property int row = (int) element.GetValue (Grid.RowProperty);} /...

sockets - What is efficient way to transfer a large file from server to multiple clients? -

I have a large file about a large file / about multicast & gt; 40g file server need to move more than one client to the time and it will only be done once for a good protocol to do this in linux? I tried to use UFTP, but it does not work. This should be a good tool for the situation if the server and client are on the same LAN, with them should be no problem. If one or more router is separating them, then you either have to configure the router to pass multicast traffic or you can use the UFCP proxy server to create a bridge between different network segments.

web applications - golang web programming tutorial code not working -

I am trying to learn to go for web programming. I am learning the language, and I recently got For the official site the tutorial has started. So far, I'm stuck on the data structure part. I have copied the code word for the word Here is the code: package main import ("fmt" "IO / ioutil") type page structure {title string Body [] byte} func (p * pages)) () (error) {filename: = p.Title + ".txt" returns ioutil.WriteFile (filename, P. body, 0600)} func loadPage (title string) ( * Page, error) {filename: = title + ".txt" body, err: = ioutil.ReadFile (filename) If mistake! = {Zero {return zero, error} return and page {title: body, body}, zero} func main () {p1: = & page {title: "test page", body: [] byte ("WHADDUP! ")} P1.save p2, _: = loadPage (" TestPage ") fmt.Println (string (p2.Body)}} is running $ build build wiki .go gives me the following: # order-line arguments ./main.go: 30: p1.save ra...

java - Is there a point to this line of code? -

Until I came to someone's code on dreamincode, I had difficulty creating a sudoku grid using the readers But they did not really interpret it and I was thinking that any person here can explain me the class room. Thinking about this because the class is empty, even though the grid still works, so I'm confused. Thank you. Import java.awt. *; Import javax.swing *; Import javax.swing.border. *; Public Square Square JPNL (Public Final Ink CELL_COUNT = 9; Public Cells] Cells = New Cells [CELL_COUNT]; Public Square () {this.setLayout (New Grid Layout (3,3)); This.setBorder (New LineBorder Color (black, 2)); for (int i = 0; i & lt; CELL_COUNT; i ++) {cell [i] = new cell (); this.add (cells [i]);}} public Class cell JTextField {Private int number; public cell () {} public zero set number (int number) {this.number = number; this.setText ("1");} public int getNumber () {return number;}} } I'm not a Java Pro, but I will try to explain it best I I can do. ...

python - scrapy crawler not working from home page -

I have a scraper written in scrap.contrib trying to collect items Scroller is I import Spider Link to Crawlspider, Scrappy.Conditib. Linkprektrosrsksmuh imports from scrapy.selector import selector SgmlLinkExtractor .. import item category GinakSpider (CrawlSpider): name = "ginak" start_urls = [ "http: //www.shop.ginakdesigns .com / main.sc"] rules = [rule (SgmlLinkExtractor (permission = [r 'category \ .sc \? category Id = \ d +'])), rules (SgmlLinkExtractor (permission = [r'product \ .sc \? ProductId = \ d + & amp; category Id = \ d + ']), callback = "Pars_aitem']] DRF Parse_item (self-response): sel = selector (response) self.log (response.url) item = Items.GinakItem () before [ 'name' ] = Sel.xpath ('// * [[id = "wrapper2"] / div / div / div [1] / div / div / div [2] / div / div / div [1] / div [1] / h2 / text () '). Remove [' item '] [' value '] = sel.xpath (' // * [@ id = "l...

php - Need assistance with regards to htaccess -

मैं इस url को परिवर्तित करना चाहता हूं: http://something.com/FLSD / डीएसएस /? डी = 624 इसमें: http://something.com/FLSD/DSS/624/ मैं यह कैसे करूँ? यह काम करना चाहिए: RewriteEngine पर पुनर्लेखन% {THE_REQUEST} ^ (प्राप्त करें | POST) \ / FLSD / DSS / \? D = ([0- 9] +) \ HTTP पुनर्लेखन नियम / / FLSD / DSS /% 2 \? [आर = 301, एल] आरईआरडीआरयूआरएलई = एफएलएसडी / डीएसएस / ([0- 9] +) /? $ / एफएलएसडी / डीएसएस /? डी = $ 1 [एल] http://something.com/FLSD/DSS/?d=624 में http://something.com/FLSD/DSS/624/