Friday, 15 January 2010

Windows C++ CMD window switching -


Hello fellow programmer, I have a problem with some console applications in the C ++ program, and my motto is as follows.

P>

  1. First create CMD windows.
  2. Run an order. (System ("Print some error text");)
  3. Create another CMD window.
  4. Change the system (...) Focus on the other CMD window.
  5. Execute a command.
  6. Change the system (...) First focus on the CMD window.
  7. Perform an order.

    The final goal will be executed by a CMD application that will create another CMD window, execute a command on it, and then focus on the original CMD window to execute the other code. Will return I do not need to keep track of the window, or be able to return it. Just create a new window, switch focus to it, execute a command, return focus to the original window.


    1. When the first CMD window is created, the app will start.
    2. Execute a command on this window with the system (...); works fine.
    3. I am creating a second CMD window with

        HWND new_hWnd = NULL; Shellexequeut (new_hand, "open", "cmd.exe", noull, null, SWSHHOO);    
    4. This is where I have problems, I am not able to redirect the system (...) into a separate CMD window, and this is the part that I need help because if I can understand it, it will be easy to complete the steps 5, 6 and 7.

      I have tried this online research and have not been able to "pipe" but reproduce them, or understand them. Also, I noticed that

        is GetConsoleWindow ();   

      The function that gives a handle for the current CMD window, there are some indications for me that the CMD should be a way of switching between windows while using the handle, but since I The second CMD window I have not concentrated I can not call to get that function to handle

      So, how can I create systems (...) target different CMD windows with handles? If this is not possible, how can I apply this "pipe" system?

      If the latter is the latter, please try to make it as detailed and simple as possible, because every example I found online is really big and difficult / read / understand

      If there is no easy way to implement "pipes" then please post or provide me the best (something that will help me to work in the pipes) you can find and I work with it I will continue to thank you, thank you in advance!

      You can create a new console for the new process by specifying .

      • Process flags:

      • Process Function:

c# - Documentation for Web API in Windows Store apps (Metro apps) -


I remember that some documents on MSDN a few months ago to access a Web API from within a Windows Store app, With samples, but I can not find this page anymore, and Google Search does not produce any related results for MSDN.

Does anyone know where the document is for this?

[nkvu - exit the comments and look for someone else in the same way] < / P>

T know where it is on MSDN, but it seems downloadable sample. And showing docs and code but there is no downloadable sample.

postgresql - postgres: localhost not connecting -


मेरा postgreSQL.conf जैसा दिखता है

  # - कनेक्शन सेटिंग्स - listen_addresses = '*' # क्या आईपी पता (एस) सुनने के लिए; # पतों की अल्पविराम से विभाजित सूची; # मूलभूत रूप से 'स्थानीयहोस्ट', '*' = सभी # (बदलाव की पुनरारंभ की आवश्यकता है) पोर्ट = 5432 # (परिवर्तन की आवश्यकता होती है पुनरारंभ करें)   

और मुझे यह भी पता है कि पोस्टग्रेस चल रहा है <पूर्व> हवा: डेटा पोस्टगे $ ps -aef | Grep पोस्टग्रेर्स 504 16474 16473 0 11:34 पूर्वाह्न ?? 0: 00.00 पोस्टग्रेर्स: लॉगर प्रोसेस 504 16476 16473 0 11:34 पूर्वाह्न 0: 00.00 पोस्टग्रेर्स: लेखक प्रक्रिया 504 16477 16473 0 11:34 पूर्वाह्न ?? 0: 00.00 डाकघरों: वाल लेखक प्रक्रिया 504 16478 16473 0 11:34 पूर्वाह्न ?? 0: 00.00 पोस्टग्रेर्स: ऑटोवॉक्वेम लॉन्चर प्रोसेस 504 16479 16473 0 11:34 पूर्वाह्न ?? 0: 00.00 पोस्टग्रेर्स: आँकड़े संग्राहक प्रक्रिया 0 16087 16078 0 10:54 पूर्वाह्न ttys001 0: 00.03 सु - पोस्टग्रेस 504 16473 1 0 11:34 पूर्वाह्न ttys001 0: 00.22 / लाइब्रेरी / पोस्टग्रे एसक्यूएल / 9.1 / बीएन / पोस्टग्रेड्स -डी / लाइब्रेरी / पोस्टग्रेएसक्यूएल / 9.1 / डेटा 504 16484 16088 0 11:34 AM ttys001 0: 00.00 grep postgres

लेकिन मैं कनेक्ट करने में सक्षम नहीं हूँ

  psql -Uuser -W पासवर्ड उपयोगकर्ता उपयोगकर्ता के लिए: psql: सर्वर से कनेक्ट नहीं हो सका: ऐसी कोई फ़ाइल या निर्देशिका नहीं है जो स्थानीय रूप से चल रहा है और यूनिक्स डोमेन सॉकेट "/var/pgsql_socket/.s.PGSQL.5432" पर कनेक्शन स्वीकार करता है?   

इसके अलावा, जब मैं निम्नलिखित चलाता हूँ

  lsof -i tcp: 5432 एक ???? मुझे @ एयर 11: 37: 13 एक ?? ~ ~ ??? नेटस्टेट-ए | Grep postgres tcp6 0 0 * .postgres *। * LISTEN tcp4 0 0 * .postgresql *। * LISTEN   

यह कहता है कि पोर्ट 5432 पर चल रहे कुछ भी नहीं मैं क्या हूं लापता?

UPDATE

मेरा pg_hba.conf जैसा दिखता है

  # TYPE DATABASE उपयोगकर्ता पता मेथोड # "स्थानीय" यूनिक्स डोमेन सॉकेट कनेक्शन के लिए केवल स्थानीय सभी सभी एमडी 5 # आईपीवी 4 स्थानीय कनेक्शन के लिए है: सर्व 127.0.0.1/32 एमडी 5 # आईपीवी 6 स्थानीय कनेक्शन होस्ट करें: सभी होस्ट करें: 1/128 एमडी 5    

pg_hba.conf में:

  सभी 127.0.0.1 को होस्ट करें / 32 विश्वास   

विश्वास में अंतिम कॉलम परिवर्तन

Create Android Live Wallpaper for any resolution -


I'm a new Android developer, and I'm making an Android live wallpaper as the first project. How can I support multi-resolution? I do not know if I should scale the images by the image or change them according to the resolution.

Actually, I'm also a new Android developer, but lately I've been working on Android's Live Wallpaper I had seen a good tutorial about who can help you, and besides this I got a similar question.



webdriver - setting request headers in selenium -


I am trying to set the request title 'referrer' to circumvent the incoming request from another site . We need a capacity test that uses a specific reference, which gives the user a special look, otherwise an alternate form is given.

I can do this within the poltergeist:

  page.driver.headers = {"Referrer" => Referer_string}   

But I can not get the same functionality for the sealium driver.

How can I set a request header in the Capebarra Selenium driver?

There is no API to do this in WebDrive. See the title of this issue for more information, that this feedback is about titles, but it was decided that the subject of this problem in Selenium would not include the API for request headings. Many issues have been marked as duplicates about adding APIs to set request headers:.,.

Here are some possibilities that I can offer:

  1. Use another driver /
  2. or some other proxy.
  3. I used to go with Option 3 in most cases. It's not hard to do.

    Note that this is not supported by other drivers.

php - Only one value from an hidden input is being displayed -


  & lt; php foreach ($ _ color_swatch $ _inner_option_id) {preg_match_all ('/ ((#? [ए -Za-z0-9] +)) / ', $ _option_vals [$ _ आंतरिक_ोपिप्शन_आईड] [' आंतरिक_लैबेल '], $ मैचों); अगर (गणना ($ मैचों [0]) gt; 0) {$ color_value = $ matches [1] [गणना ($ मैचों [0]) - 1]; ? & Gt; & Lt; li & gt; & Lt; input type = "hidden" id = "fakecolor" value = "& lt;? Php गूंज $ color_value;; & gt;" / & gt; & Lt; div onclick = "अलर्ट (document.getElementById ('fakecolor')। मान);" & gt; & Lt; img src = "& lt;? Php गूंज $ color_value;; & gt; .png" / & gt; & lt; / div & gt; & Lt; / li & gt; & Lt;? Php}}? & Gt;   

यह $ color_value का उपयोग करते हुए छवियों को प्रदर्शित करने के लिए काम करता है, लेकिन मुझे छिपे हुए इनपुट से दूसरे जावास्क्रिप्ट फ़ंक्शन पर मूल्य देना होगा। और जब मैं div पर क्लिक करता हूँ तो यह केवल एक मान को प्रदर्शित करता है, चाहे कितना कोई भी foreach के अंदर हो। क्या कोई मुझे थोड़ी मदद दे सकता है? धन्यवाद।

यह आउटपुट है:

  & lt; li & gt; & Lt; इनपुट प्रकार = "छुपा" id = "fakecolor" value = "red" / & gt; & Lt; div onclick = "चेतावनी (document.getElementById ('fakecolor')। मान);" & gt; & lt; img src = "red.png" / & gt; & lt; / div & gt; & Lt; / li & gt; & Lt; li & gt; & Lt; इनपुट प्रकार = "छिपा हुआ" आईडी = "नकली रंग" मान = "नीला" / & gt; & Lt; div onclick = "चेतावनी (document.getElementById ('fakecolor')। मान);" & gt; & lt; img src = "blue.png" / & gt; & lt; / div & gt; & Lt; / li & gt; & Lt; li & gt; & Lt; इनपुट प्रकार = "छुपा" id = "fakecolor" value = "white" / & gt; & Lt; div onclick = "अलर्ट (document.getElementById ('fakecolor')। मान);" & gt; & lt; img src = "white.png" / & gt; & lt; / div & gt; & Lt; / li & gt; & Lt; li & gt; & Lt; इनपुट प्रकार = "छिपा हुआ" आईडी = "नकली रंग" मान = "हरा" / & gt; & Lt; div onclick = "अलर्ट (document.getElementById ('fakecolorx')। मान);" & gt; & lt; img src = "green.png" / & gt; & lt; / div & gt; & Lt; / li & gt;   

लेकिन जब मैं प्रत्येक divs पर क्लिक करता हूँ, यह केवल दूसरे, नीले रंग का मान दिखाता है।

इस तरह से कुछ प्रयास करें:

  & lt;? Php $ cont = 0; Foreach ($ _ color_swatch $ _inner_option_id के रूप में) {preg_match_all ('/ (([[A-Za-z0- 9] +)) /', $ _option_vals [$ _in_option_id] ['internal_label'], $ मैचों); अगर (गणना ($ मैचों [0]) gt; 0) {$ color_value = $ matches [1] [गणना ($ मैचों [0]) - 1]; ? & Gt; & Lt; li & gt; & Lt; इनपुट प्रकार = "छुपा" id = "फर्जी रंग & lt;? Php echo $ cont;? & Gt;" मान = "& lt;? Php $ color_value;; & gt;" & gt; & Lt; div onclick = "अलर्ट (document.getElementById ('नकली रंग और लेफ्टिनेंट;? Php गूंज $ cont?; & Gt;')।);); & Gt; & Lt; img src = "& lt;? Php गूंज $ color_value;; & gt; .png" / & gt; & lt; / div & gt; & Lt; / li & gt; & Lt;? Php} $ cont = $ cont + 1; }? & Gt;   

इस तरह से हर इनपुट में छिपी एक अलग आईडी है, वही पर क्लिक फ़ंक्शन।

Saludos;)

c - mutex_init() causes weird segfault -


I am stopping at a strange issue that is trying to deal with posix threads. I'll start with the code:

  #include & lt; Pthread.h & gt; # Include & lt; Semaphore.h & gt; Type-Ff Structure {pthread_mutex_t * mutex; } Buffer_t; Buffer_t * buffer_loc (unsigned integer maximum size) {buffer_t * buffer = (buffer _t *) mlok (size (buffer_t)); If refund (buffer == faucet); Pthread_mutex_init (buffer-> mutex, NULL); // This line causes crash pthread_mutex_t * mutex; Pthread_mutex_init (mute x, tap); // This is not a   

}

I have a partition error for the first time at pthread_mutex_init () . Here's the GNB's Runlogo and Backatas:

  [Thread debugging enabled using libthread_db] using the host LibTrade_db library "/lib/x86_64-linux-gnu/libthread_db.so.1" is. Program received signal SIGSEGV, Segmentation fault. __pthread_mutex_init (mutex = 0x0, mutexattr = 0x0) at Pthread_mutex_init.c: 83 83 pthread_mutex_init.c: There is no such file or directory (Gdb) on backtrace # 0 pthread_mutex_init (mutex = 0x0, mutexattr = 0x0) pthread_mutex_init.c: 83 # 1 0x000000004015a8 in buffers_alloc (maxSize = 10) at buffers.c: 26   

Thanks for your help!

The indicator that you are passing through pthread_mutex_init () is unpublished, allocated memory , So your program invokes undefined behavior what you can do to modify your structure or buffer_loc () function to explicitly allocate memory for Mute X . I. E., Solution # 1 (I like this one):

  typed format {pthread_mutex_t mutex; } Buffer_t; Buffer_t * buffer_loc (unsigned integer maximum size) {buffer_t * buffer = molk (size (* buffer)); If refund (buffer == faucet); Pthread_mutex_init (and buffer-> mutes, tap); // return buffer etc; }   

Resolution # 1, dynamic allocation:

  typed format {pthread_mutex_t * mutex; } Buffer_t; Buffer_t * buffer_loc (unsigned integer maximum size) {buffer_t * buffer = molk (size (* buffer)); If refund (buffer == faucet); Buffer-> Mute x = mauloq (size (* (buffer-> mutes))); If (buffer-> mute x == faucet) {free (buffer); Return tap; } Pthread_mutex_init (buffer-> mutex, NULL); // return buffer etc; }   

In the latter case, do not forget about free with Mute X as well as "district".

In addition to this,

jquery - If ul has has no children, how can I hide or addClass to a span above it? -


So I have jquery style accordion, with jquery UI referenced on page. I am pulling navigation information from a database, and the html structure looks like this:

  & lt; Div id = "accordion" class = "ui-accordion ui-widget ui-helper-reset" role = "tablist" & gt; & Lt; Li class = "sub-item" & gt; & Lt; Div class = "ui-accordion-header ui-helper-reset ui-state-default U-corner-all ui-accordion-icons" role = "tab" id = "ui-accordion-accordion-header-0" area- Control = "lvl2" area-selected = "false" tabindex = "0" & ​​gt; & Lt; Span class = "ui-accordion-header-icon ui-icon ui-icon-triangle-1-e" & gt; & Lt; / Span & gt; & Lt; A href = "/ business / events / upcoming-events" & gt; Upcoming events & lt; / A & gt; & Lt; Span id = "arrow" & gt; & Lt; / Span & gt; & Lt; / Div & gt; & Lt; Ul id = "lvl2" class = "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" style = "display: none;" Area-labeling = "ui-accordion-accordion-header-0" role = "tabanel" aria-expanded = "false" aria-hidden = "true" & gt; & Lt; Li class = "lvl2" & gt; & Lt; A href = "/ upcoming-events / meeting-center" & gt; Meeting center & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Li & gt; & Lt; Li class = "sub-item" & gt; & Lt; Div class = "ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-accordion-icons" role = "tab" id = "ui-accordion-accordion-header-1" Aria- Controls = "lvl2" area-selected = "false" tabindex = "- 1" & gt; & Lt; Span class = "ui-accordion-header-icon ui-icon ui-icon-triangle-1-e" & gt; & Lt; / Span & gt; & Lt; An href = "/ Ebusiness / Meetings / MeetingsCalendar" & gt; Calendar of Events & lt; / A & gt; & Lt; Span id = "arrow" & gt; & Lt; / Span & gt; & Lt; / Div & gt; & Lt; Ul id = "lvl2" class = "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" style = "display: none;" Area-labeling = "ui-accordion-accordion-header-1" role = "tabpanel" aria-expanded = "false" aria-hidden = "true" & gt; & Lt; / Ul & gt; & Lt; / Li & gt; & Lt; / Div & gt;   

My goal here is to remove the tag, or to add a class that I can again profane: none, if there is no child in the UL # lvl2 list.

This is the jquery function I'm trying to do, but does not seem to execute

  if ($ ('# lvl2: Childland')) {$ ("# Arrow"). AddClass ("blank"); }   

I'm not throwing an error.

Thanks

  if ($ ('# lvl2'). Children () Length) $ ("#Air") AddClass ("blank");   

or with brunch:

  if ($ ('# lvl2'). Children (). Length) {$ ("# arrow") . AddClass ("blank"); }   

The reason for this is that if the length is 1.Infinity , then it is actually valid:

  if (1) {warning ("literally"); }   

but validates 0 :

  if (0) {alert ("farsi"); } And {warnings ("literally"); }   

You ! .

 ! 0 === Using the truth, you can validate the opposite; ! 1 === Wrong; ! False === true; ! True === wrong;   

And then:

  !! 0 === Wrong; !! 1 === true; wrong! === Wrong; !! True === true;    

cryptography - Disable diffie-hellman or setting session key -


Do you know whether it is possible to disable Disp-helmman or set a fixed session key for openssh? Actually, I want to analyze traffic with Wireshark and I have to decrypt it.

Your options with SSH are actually limited to Virhark because it uses session keys from DH OpenSSH does not have "fixed session key mode" because it will actually be unsafe and will make the key oven basically impossible to solve the open channel.

You have to enter an MITM between your client and server, to analyze the virus shark, a DPP file of decrypted traffic will be recorded. There is a good tool for this.

c# - Case sensitive in linq Query -


इस सवाल का पहले से ही एक उत्तर है: < / P>

  • 8 जवाब

    इस कोड का उपयोग प्रमाणीकरण व्यक्ति के लिए लॉगिन, मेरी समस्या उदाहरण के लिए पासवर्ड में है यदि

    पास = एएएए और हम सिस्टम में एआएए लॉगिन दर्ज करते हैं, खोज में संवेदनशील मामले के लिए क्या करना है?

      इंस्पेक्टर निरीक्षक = संदर्भ। इंस्पेक्टर। कहाँ (i = & gt; i.InspectorUserName == उपयोगकर्ता नाम & amp; amp; i। इंस्पेक्टर PSSWord == passWord)। FirstOrDefault ();   

    धन्यवाद

    लिनक (और उस बात के लिए सी #) < मजबूत> पहले से ही संवेदनशील जांच करता है , इसलिए आपको उस को शामिल करने के लिए अपना कोड संशोधित करने की आवश्यकता नहीं है।

    अन्य नोट पर, आपको वास्तव में हैश चाहिए पासवर्ड:)

jni - Maven - UnsatisfiedLinkError with java.library.path -


I'm having trouble trying Maven to load my original library. Currently, I placed my library file (.so) in the src / main / resources / and I can not find an error in I java.library.path. I also tried to place the project in my base directory, but I got this result.

Below I tried the Maven plugin, but it does not seem to work.

  & lt; Plugin & gt; & Lt; Group & gt; Org.apache.maven.plugins & lt; / Group & gt; & Lt; ArtifactId & gt; Maven- Perfect-plugin & lt; / ArtifactId> & Lt; Configuration & gt; & Lt; SystemProperties & gt; & Lt; Property & gt; & Lt; Name & gt; Java.library.path & lt; / Name & gt; & Lt; Price & gt; $ {Project.build.directory} & lt; / Pricing & gt; & Lt; / Property & gt; & Lt; / SystemProperties & gt; & Lt; / Configuration & gt; & Lt; / Plugin & gt;   

If this helps, then I will run my project directly from Eclipse. I know how to get it to work in eclipse, but it wants to work with Maven.

@EDIT I ​​also tried to run it on the command line and I still got the same mistake

I did the following in my project:

  & lt; Plugins & gt; & Lt; Plugin & gt; & Lt; Group & gt; Org.apache.maven.plugins & lt; / Group & gt; & Lt; ArtifactId & gt; Maven- Perfect-plugin & lt; / ArtifactId> & Lt; Configuration & gt; & Lt; ArgLine & gt; -Djava.library.path = / path / to / your / libs: $ {java.library.path} & lt; / ArgLine & gt; & Lt; / Configuration & gt; & Lt; / Plugin & gt; & Lt; / Plugins & gt;   

And it worked like this for me.

.net - asp.net Panel DefaultButton property not working in Android Browser? -


Clicking the button that goes to the Android keyboard does not run the default button. It works in the iPhone

  & lt; Asp: panel runat = "server" id = "submitPanel" DefaultButton = "submit" & gt; & Lt; Asp: LinkButton id = "submit" runat = "server" OnClick = "SubmitButton_Click" & gt; Submit & lt; / Asp: LinkButton & gt; & Lt; / ASP: Cell & gt;    

Only button and image button controls are supported.

c# - Microsoft ReportViewer System.IOException with Subreports, RV Looking in Wrong Directory -


I get many reports in that project on which I am working, which was created by another company, Which does not work for the company for a long time. Report All work is fine, most of the time there are multiple sub-reports that work fine too. A special report on which I am working has multiple subreports, but they are not working.

Sub-reports have been shown and displayed, as they should, therefore, from outside, that everything is working properly. However, when I display the report, I get around 5 sets of system for each subreport. The exception states that the subreport files can not be found and for some reason it is looking for the subreport files in the 'c: /' directory. I can not understand why this is happening and why this is happening only for a report.

I know that all the subportal files should be in the same directory, as is being used with those reports and they are actually there to exist. I have seen every report and sub-report file through the source, and none of them points to any difference between the reports which do not throw exceptions. = "Post-text" itemprop = "text">

The problem was a file access rights issue. I had a project saved under the root directory, but it was moved to the default location ("Document / Visual Studio 2010 / Projects /").

python - Get the name of the queue a caller is in, Twilio -


I am setting up a phone tree using twilio and python. I am trying to get the name of a queue which is to send an agent with an SMS alert. I've gathered that the name of the queue & lt; Enqueue & gt; There is a noun within the verb but nothing can be found about how to get that name code.

This section & lt; Assemble & gt; Answers the verb and specifies the caller in the queue based on what they had entered.

  @Apple Root ('/ open', methods = ['post']) DEF open (): response = twiml.response () if request.form ['digit'] == "1": response.enqueue ("normal", Waiting URL = "/ Waiting") Elif Request. Format ['digit'] == "2": reaction. ("Current", wait URL = "/ wait") return str (feedback);   

This section tells the caller in their status queue, captures music, sends an SMS message. Where is currently request.form ['QueueSid'] , where I want to place the queue "friendly name" - for example, "normal".

  @Apple Route ('/ wait', methods = ['post']) Def wait (): response = twiml.response () response.say ("You are in% s queue."% Request.form ['Position Position'] ) Response. Play ("http://com.twilio.music.classical.s3.amazonaws.com/BusyStrings.mp3") account_sid = "*****" auth_token = "*****" Client = TwilioRestClient (account_sid, Auth_token) from client.sms.messages.create (= "+ 15555555555", _ = "+ 15555555554", body = "caller call is in queue -% (queue) s"% {"in line] Num "}: request.form ['from']," line ": request.form ['queueid']}) return str (feedback)   

Thanks!

It turns out that I need to use Twilio customers Get queue details based on your SID. Among the details I was looking for, friendly_name . The solution is the updated code -

  @ app.route ('/ wait', methods = ['POST']) def wait (): response = twiml.response () response. ("You are% s in queue."% Request.form ['QueuePosition']) response.play ("http://com.twilio.music.classical.s3.amazonaws.com/BusyStrings.mp3") Account_sid = "*****" auth_token = "*****" Client = TwilioRestClient (account_sid, auth_token) queue = client.queues.get (request.form ['queueSid']) # CID friendly name based on queue = Queue.friendly_name; From the client.sms.messages.create (= "+ 15555555555", _ = "+ 15555555554", body = "Caller in the call queue - # (num) s in queue% (Queue) caller id and queue favorable name # sms with return string (response) Hope that "% {" num ": request.form ['from']," Queue ": friendlyName}) This helps someone .. :)   

windows - Diffing remote branches with msysgit -


I am trying to use git to my team and since most of them want GUI, then I run down I am Msysgit Path I have a good set of written instructions for a lot of daily work, but I am stumped on how to do code reviews, to keep it simple, I have made them an initial one with their owner's name Shaw with the name as the point Received'm saying to make, then I hereby changes / commitment at the local level and push the central repository where they can bring their changes to other gods review. I had a plan to examine them in the isolation of different Gods and after that they distinguish them against the guru. In Bash words, this will look like this:

  GIT Checkout original / FRED GIT difference - H parent / Master   

I can get a GUI at checkout Without a problem, a remote branch as a separate head, but I can not seem to find a way to differentiate against another branch, local or remote UI has happily shown changes in local branch but code reviews For the We need to see changes against the existing production code. Any thoughts on how this can be done? Is there any other GET windows client that is better than msysgit?

I think msysgit when it comes to GUI, features I like and a healthy list from the GIT command line. For example I git ext to ! Start / b gitextensions that rises git extensions history pins well if I am in the mood to be committed through GUI, then I have to go to git commit-ext to ! Start / b gitextensions is rigged to commit

Another invaluable tool and when there are amazing things in git.

javascript - How to pass jQuery No Conflict to an object I have placed in a namespace -


With the following I have created a namespace for my object:

  var namespace = {Register: function (_Name) {var chk = false; Var cob = ""; Var spc = _Name.split ("."); (Var i = 0; i & lt; spc.length; i ++) {if (cob! = "") {Cob + = ".";} Cob + = spc [i]; Chk = this.Exists (cob); If (! Chk) {this.Create (cob);}} if (chk) {"Namespace:" + _Name + "is already defined."; }}, Create: function (_Src) {eval ("window." + _Src + "= new object ();"); }, Present: function (_Src) {eval (try "{var =" false "}; {{= False;} "); Return NE; }}   

Define the object:

  Namespace. Registrar ("System.Classes.HelloWorld"); System.Classes.HelloWorld = Function (AA) {Return: Message: "Hello World!", Hello: Function (A, B) {Alert (this message + A + B); I can not apply a code in NoConflict to JQuery in the above code.  

This code wraps jQuery notefix and allows a dollar sign which I would like to repeat:

  (task (skillet, $, undefined)} {// Private property is: hahat = true; // public property skillet.English = "bacon strips"; // public methyl skillet.free = function () {var olive oil; "add" ("\ t \ n butter \ n \ t") ; AddItem (oliveOil); console.log ("frying" + skillet.needient);}; // personal method function addItem (item) {if (item! == Additional Defined) {Console.log ("add" + $ .trim (item))}}}} (window.skillet = window.skillet || {}, jquery));    

You would like to try this pattern:

  Var namespace = (function ($) {// private member var register = function (_Name) {// ...}; var create = function (_Src) {// ...}; var exists = function (_Src ) {// ...}; // Reveal that the public member is back (register: register, create: create, exists: present);}}) ();   

This does not only allow the definition of private members of all types, but rather to fulfill the internal function call with namespace or Avoids the requirement. <. / Code>.

AutoHotkey script not starting while running Skyrim -


Before the overwriting of the game, I want to use a simple script to back up the existing script. Basically, I want every time I hit F5, there is a new saved file:

  F5 :: oldquate: = "c: \ users \ me \ documents \ My Games \ Skyrim \ Saves \ quicksave. "FileGetTime, CustomMem,% OldKidsWave% BACKUPFilename: =" C: \ USER \ I \ DOCUMENTS \ MY GAME \ SCHEME \ SERVICES \ OLDICKSKEKEV " Copy of Qstime "OS" file,% OldQuickSave%,% BackupFileName% SendPlay {F5} Return   

This works out of the game, but when the game is played, the order is not up to autoshook Reaches. Game saves, as it should be, but the script has not started. It seems that I never pressed the key. My guess is that SkyRime uses direct input to read the keyboard, it consumes the incident and does not send it forward, is there any workaround? Or any other solution to create a new savegame file for each quick sharing?

I found an alternate solution using the following:

  Label: KeyWith, F5, D Old Skyssev: = "C: \ User \ My \ Documents \ My Game \ Skym \ s \ QuickSave.ess" FileGetTime, qstime,% OldQuickSave% BackupFileName: = "c: \ User \ In the case of pressing for the "Long" period of Qstime "Long" period, "Fire", "Old Quick Savvy %%",% backup file name% Sleep, 5000 Geto, label   

There is sleep to stop many executions. I am still curious who went wrong for the first time.

Classic ASP - mimic Back browser button -


What's the best way to mimic the "back" browser button?

Using browser javascript call history.back.

  window .history.back ()    

Stdin redirection from Python -


I have a program that can be read by the name of some_binary :

  few_languages ​​< Input   

Where input is usually a file in the disk.

/ Code> Usually a file containing the following content I have this in Python:

  0 0.2 0 0.4 1 0.2 0 0.3 0 0.5 1 0.7   

I do this in Python like this: < Import as pre> np # np # random binary numbers first_column = np.random.random_integers (0,1, (6,)) random number between # 0 and 1 second_column = np .random.random ( (6,))

How can I feed the combination of some_binary to first_column and second_column As I some_binary & lt; , Cwd = None, my_input): retVal = subprocess.Popen (cmd, shell = true, stdout = subprocess.PIPE, stdin = my_input, cwd = cwd); RetVal = retVal.stdout.read (). Strip ('\ n'); Retval;

But I'm not sure I'm going in the right direction.

Yes, you are going in the right direction.

You can use Python subprocess.check_output () function which is a feature wrapper around the subprocess. Popen () . Popen needs more infrastructure

something like

when something happens

< / P>

<> Output = Subprances Checkout ([CMD], stdin = my_input)

should work in your case.

mysql - which is more efficent, DELETE and INSERT or INSERT and UPDATE -


I have an EVA table structure, Visesh_, Visesh_ and Visesh_ performance does not need to fill < p> i is a SQL script that populate these Eve characteristics of products, how is stored in the works my scripts that process data from these 3 values ​​and temporary table, when all my data Is when I update the eve attributes

It is possible for any of these values ​​of the product so I have 2 apps

1) Delete for the products I listed Eve value temporary table, then INSERT those 2) INSERT has been assigned to those values ​​ UPDATE with a

I am working with more than 10,000 products, so i am thinking which is more efficient because i reduce the time limit of query Want

  list Kren_prodkt_netiti_detaim (Ikai_prkar_aidi, store_i (4, 0, PRODUCT_ID_1, ATTRIBUTE_ID_FOR_SPECIAL_FROM , SOME_DATE_VALUE), (4, 0, PRODUCT_ID_2, ATTRIBUTE_ID_FOR_SPECIAL_TO, SOME_DATE_VALUE) value, (4, 0, PRODUCT_ID_2, ATTRIBUTE_ID_FOR_SPECIAL_FROM, SOME_DATE_VALUE), - ... and so on ... and so kind-... and so on duplicate key update value = value (value)   

and the same (for the special display area may be datatype.)

I assumed Magnes here Why It was the only thing I have ever seen using Iavi.

This 2 questions will help you to update all affected products at once, thus reducing the effect on the database (reindexing). Another way to do single queries within a query within a transaction, to avoid reindex per entry.

html5 - Variables stored in localstorage disappears when the page is refreshed -


This is a webpage where you can choose your background image with three radio buttons. I want to save the chosen one in the local storage, so when the page refreshes the last selected background image. This is not the case and I do not understand, why do you do it? Thanks in advance :)

  & lt ;! DOCTYPE html & gt; & Lt; Html manifest = "my.manifest" & gt; & Lt; Top & gt; & Lt; Script src = "modernizr.js" & gt; & Lt; / Script & gt; & Lt; Script & gt; Function SetBug () {myForm = document.getElementById ("bgList"); For (var i = 0; i  & Lt; Input type = "radio" name = "land" value = "news", onClick = "setBg ()" & gt; Norgay & lt; / Input & gt; & Lt; Input type = "radio" name = "land" value = "sverige.png" onClick = "setBg ()" & gt; Sverige & lt; / Input & gt; & Lt; Input type = "radio" name = "land" value = "danmark.png" onClick = "setBg ()" & gt; Denmark & ​​lt; / Input & gt; & Lt; / Form & gt; & Lt; / Body & gt; & Lt; / Html & gt;    

I do not understand which part does not work? The warning displays the selected option properly, but when you are alerting before setting the background, there is no background style at the time of the alert, when you press the warning that the image is set correctly.

  & lt ;! DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Script src = "http://modernizr.com/downloads/modernizr-latest.js" & gt; & Lt; / Script & gt; & Lt; Script & gt; Function SetBug () {myForm = document.getElementById ("bgList"); For (var i = 0; i  & Lt; Input type = "radio" name = "land" value = "news", onClick = "setBg ()" & gt; Norgay & lt; / Input & gt; & Lt; Input type = "radio" name = "land" value = "sverige.png" onClick = "setBg ()" & gt; Sverige & lt; / Input & gt; & Lt; Input type = "radio" name = "land" value = "danmark.png" onClick = "setBg ()" & gt; Denmark & ​​lt; / Input & gt; & Lt; / Form & gt; & Lt; / Body & gt; & Lt; / Html & gt;   

Try this code This works updated with the latest

Spliting string based on length from end in PHP -


I want to split a string from the back. Like:

  $ mystring = "This is my string"; $ Mysecondstring = "histimistration";   

I want to divide the last 6 characters from the above stars, here it is "string". How can I do PHP? By using str_split , I can divide by the front, but I need it from the end.

Thanks in advance.

Use

edit

  $ snippet = substr ($ mystring, 0), -6);    

objective c - Issue launching X11 app via NSTask -


Text after "

My application uses NSTask to execute shell scripts, launch one X11 application from those scripts (special >

Profile # setup $ path / etc together to become one

But it fails with:.

  gtk.icon_theme_get_default () append_search_path (meld.paths.icon_dir ()) Traceback (most recent last call): file "/ usr / local / bin / meld", line 132, & lt ; Module & gt; . Gtk.icon_theme_get_default () append_search_path (meld.paths.icon_dir ()) AttributeError: 'NoneType' object is not a property 'append_search_path'   

As a proof of the concept I do this The script for which is completely changed:

  # / usr / bin / dark red colored executive 'osascript -e' to say "terminal application" terminal "script front" Dir.pwd + 'Will Meet' To Do It! Window \ '\   

Is there a problem? Here's my code to execute a shell script:

  NSTask * task = [[NSTask alloc] init]; Task.launchPath = self.scriptURL.path; Work.standardOutput = [NSPipe pipe]; Task.currentDirectoryPath = Task Directory URL.path; [Launch the task];    

X11 applications DISPLAY learn the address of the display server using environment variables.

On OS X, the DISPLAY value is randomly remembered for security reasons, so you can not hard-code it, as you have seen. Instead, there is a launcher agent that launches projection to launch when it starts a process.

Somewhere between launch and mail, the price of DISPLAY has been deleted or overwritten. Your job is to find out where it is.

  1. Make sure the launch agent is running. Run launctl list and see org.macosforge.xquartz.startx. Since meld is working with terminal.app, this part is probably correct.
  2. Make sure that DISPLAY is set in your app, it should be listed in the [NSProcessInfo processInfo]. Environment .
  3. Make sure that you have a display set in the launch of NSTask, try running / usr / bin / env with NSTask, and make sure that DISPLAY appears in your output is.
  4. Make sure that DISPLAY is set inside the script you have run echo $ DISPLAY before and sourcing ~ / .profile (sometimes .profile is wrong to yourself Overwrites the value because it is sometimes the right thing to do this on other operating systems.)

    Edit: This code is a shell script Used to copy performance from my GUI app:

      NSTask * function = ... task.environment = [NSProcessInfo processInfo] .environment; [Task.launch];    

Matcher Assertions failed error opencv Android -


I am writing code to find similar objects from Drawable in camera preview. I'm using the latest OpenCV 2.4.4.

Below are an output from my work and logcat. Am I doing the wrong thing that I am getting such an output?

  to detect public zeros (MAT MARGBA) {object_desc = new MET (); Scene_desc = new met (); Object_keys = New MatOfKeyPoint (); Scene_keys = New MatOfKeyPoint (); Matches = new matth de match (); Good_match = new matfodmatch (); Bitmap image = bitmapfichtor. Decode processing (getResources (), R.drawable.sto); Utils.bitmapToMat (image, object); Surf = featuredoc Create (FeatureDirector. FAST); Surf.detect (object, object_keys); Surf.detect (mRgba, scene_keys); Surfx = Descriptor Extractor Create (Descriptor Extractor. Bride); SurfEX.compute (object, object_keys, object_desc); SurfEX.compute (mRgba, scene_keys, scene_desc); Dm = Description Matter. Cut (descriptor mater. BRUTEFORCE_SL2); Dm.match (object_desc, scene_desc, matches); Double max_dist = 0; Double min_dist = 100; (Int i = 0; i & lt; object_desc.rows (); i ++) {double distance = matches for To Array () [i]. Distance; If (dist>  max_dist) max_dist = dist; } For (int i = 0; i & lt; object_desc.rows (); i ++) {MatOfDMatch temp = new MatOfDMatch (); If (matches. To arrays) [i]. Distance = 3 * min_dist) {temp.fromArray (matches.toArray () [i]); Good_matches.push_back (temporary); }}} Cameraframe on public mat (CVCMARViFrameInputFrame) {mRgba = inputFrame.rgba (); Detect_image (mRgba); Return inputFrame.rgba (); }   

Logkat:

  03-27 01: 55: 31.258: E / CV :: error () (564): OpenCVI error: failure failed (Type == src2.type () & amp; src1.cols == src2.cols & amp; (Type == CV_32F || Type == CV_8U)) Zero CV :: Batch Distance (CV :: Input Aurere , Cv :: InputArray, cv :: OutputArray, int, cv :: OutputArray, int, int, cv :: InputArray, int, bool), file / home / report / ci / slave / 50-sdk / opensev / module / Core /src/stat.cpp, line 1803    

Just to close this question For:

Unless your comment In essence, the following line was causing problems:

  dm.match (object_desc, scene_desc, mail);   

I have advised you to manually verify:

  (object_desc.type == scene_desc.type and object_desccols = = Object_scene.cols)   

The problem is finally for the first frame, object_desc.cols ()! = Scene_desc.cols () . A simple if was enough to solve the problem.

Two Eclipse Android Projects: One is a widget, one is a normal app. How to connect? -


I've helped on the development site:

Downside is my code to my app's class Search.

  intent to intent = new intent (reference, package for main activity; Pending pending vertical positioning = pending.activity (reference, 0, intent, 0); Remote power view = new remote power (context.getPackageName (), R.Lay Out.man); View.setOnClickPendingIntent (R.id.widget_textview, pending pending);   

Package for MainActivity is a completely separate project in Eclipse.

So I added the package for the menactivity for my widget, and put it in my widget in front of the order.

Create an order:

- & gt; The main activity package & lt; -

Widgets / src

Android 4.2.2

Android dependencies

The app is already on my emulator, and works fine Does.

The widget works fine without trying to connect to the app (so without those 4 lines)

What I find here, when I try to connect two , And is installed on the emulator:

[widget] ------------------------------

[Widget] Android Launch!

[Widget] ADB is running normally.

[Widget] No launcher activity found!

[Widget] Launch will only sync the application package on the device! [Widget] Sync

[Widget] Auto target mode: Compatible AVD 'NexusS' is running using the existing emulator 'emulator-5554' < P> [Get Width] widget on 'emulator-5554'. Uploading the app.

[Widget] Installing Widget.apk ...

[Widget ] Success! [Widget] found project dependence, installed: main activity

[main activity] already posted application. There is no need to reinstall.

[widget] / on / widget / bin / widget .apk install

[widget] done!

is thrown to the widget but does not work only shows the default string value. In the code in the code there is an error

  intent = new intent (reference, main & Lt; package for activity; silent activity class;);   

It basically says "class not found"

Any help on how to get this class? Should you try to link it before accepting?

Note that there are 0 problems with this code in Eclipse. It assumes that other projects have been imported, and classes can be made.

Google is great documentation You probably want to reveal your data with a content provider:



terminal - "subl" command not found -


When I try to edit a file, such as ~ / .gemrc , At the terminal, I get this error:

  $ subl ~ / .gemrc -bash: subl: command not found    

If it does not work and you are using RVM, then run: ln -s "/ applications / Sublime Text 2" In both of these commands, it is believed that Sublime Lesson 2 is in your application directory Is cursed. If it is established by its elsewhere, its order changes.

Then, enter export EDITOR = 'subl -w' to enable editing with the subl command.

offline google map android -


I try to follow the documents to work with the Google Map API, but this is not work.

My manifest

  & lt; Manifest xmlns: Android = "http://schemas.android.com/apk/res/android" package = "com.example.gogplemap" android: versionCode = "1" Android: version name = "1.0" & gt; & Lt; Use-sdk android: minSdkVersion = "8" Android: targetSdkVersion = "17" /> & Lt; Permission Android: name = "com.example.gogplemap.GOOGLEMAP" Android: protectionLevel = "signature" & gt; & Lt; / Permission & gt; & Lt; Usage-permission Android: name = "com.example.gogplemap.GoogleMap" /> & Lt; Android: Android: icon = "true_android": icon = & Lt; Activity Android: name = "com.example.gogplemap.GoogleMap" Android: label = "@ string / app_name" & gt; & Lt; Intent-Filter & gt; & Lt; Action Android: name = "android.intent.action.MAIN" /> & Lt; Category android: name = "android.intent.category.LAUNCHER" /> & Lt; / Intent-Filter & gt; & Lt; / Activity & gt; & Lt; Meta-Data Android: name = "com.google.android.gms.maps.MapFragment" Android: value = "AIzaSyBPQPMrlJk-Ft48z0CWvpWBRcLIRIJJ4X4" /> & Lt; / Application & gt; & Lt; / Reveal & gt;   

My layout activity_ google_map.xml

  & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Fragment xmlns: Android = "http://schemas.android.com/apk/res/android" Android: id = "@ + ID / map" Android: layout_width = "match_parent" Android: layout_height = "match_parent" Android: name = "Com.google.android.gms.maps.MapFragment" />   

View my method set in GoogleMap.java

  Secure vs. creation (bundle saved instenstate) {super.onCreate (savedInstanceState); SetContentView (R.layout.activity_google_map); }   

Thanks a lot

Try this way: This will work for you!

Layout:

  & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Piece xmlns: Android = "http://schemas.android.com/apk/res/android" xmlns: map = "http://schemas.android.com/apk/res-auto" Android: id = "@ + ID / map "Android: layout_width =" match_parent "Android: layout_height =" match_parent "class =" com.google.android.gms.maps.SupermarkMapFragment "/>   

Activity:

  import android.os.bundle; Import android.support.v4.app.FragmentActivity; Import com.google.android.gms.maps.SupermarkMapFragment; Public class increases main activity fracture activity {@ Override Protected Zero to Crate (InstanceStatus saved from Bundle) {Super. Secret (Saved Instantstate); SupportMapFragment Piece = New SupportMapFragment (); GetSupportFragmentManager (). BeginTransaction () .add (android.R.id.content, fragment) .commit (); }}   

Clear:

  & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Xmlns Reveal: Android = "http://schemas.android.com/apk/res/android" package = "com.example.androidmapview" android: versionCode = "1" Android: versionName = "1.0" & gt; & Lt; Use-sdk android: minSdkVersion = "8" Android: targetSdkVersion = "16" /> & Lt; Allow Android: name = "com.example.androidmapview.permission.MAPS_RECEIVE" Android: protectionLevel = "signature" /> & Lt; Usage-permission Android: name = "com.example.androidmapview.permission.MAPS_RECEIVE" /> & Lt; Usage-permission Android: name = "android.permission.INTERNET" /> & Lt; Usage-permission Android: name = "android.permission.WRITE_EXTERNAL_STORAGE" /> & Lt; Usage-permission Android: name = "android.permission.ACCESS_COARSE_LOCATION" /> & Lt; Usage-permission Android: name = "android.permission.ACCESS_FINE_LOCATION" /> & Lt; Use-permission Android: name = "com.google.android.providers.gsf.permission.READ_GSERVICES" /> & Lt; Android: Android: icon = "true_android": icon = & Lt; Activity Android: name = "com.example.androidmapview.MainActivity" android: label = "@ string / app_name" & gt; & Lt; Intent-Filter & gt; & Lt; Action Android: name = "android.intent.action.MAIN" /> & Lt; Category android: name = "android.intent.category.LAUNCHER" /> & Lt; / Intent-Filter & gt; & Lt; / Activity & gt; & Lt; Meta-Data Android: Name = "com.google.android.maps.v2.API_KEY" Android: value = "*********************************************** ******** UW "& gt; & Lt; / Meta Data & gt; & Lt; / Application & gt; & Lt; Uses - Features Android: glEsVersion = "0x00020000" Android: required = "true" /> & Lt; / Reveal & gt;    

jQuery traversal -


मेरे पास दो पंक्तियों के साथ एक मेज है:

  & lt; tr class = ' डेटा '& gt; & Lt; td class = 'img' & gt; & lt; img वर्ग = 'थंबनेल' src = 'उत्पाद इमेज / आईएमजी_1894_72.jpg' / & gt; & lt; / td & gt; & Lt; td class = 'bc_img' & gt; & lt; img वर्ग = 'थंबनेल' src = 'उत्पाद इमेज / आईएमजी_1893_72.jpg' / & gt; & lt; / td & gt; & Lt; / टीआर & gt; & Lt; tr class = 'डेटा' & gt; & Lt; td class = 'img' & gt; & lt; img वर्ग = 'थंबनेल' src = 'उत्पाद इमेज / आईएमजी_1318_72.jpg' / & gt; & lt; / td & gt; & Lt; td class = 'bc_img' & gt; & lt; img वर्ग = 'थंबनेल' src = 'उत्पाद इमेज / आईएमजी_1646_72.jpg' / & gt; & lt; / td & gt; & Lt; / टीआर & gt;   

कक्षों में छवियाँ थंबनेल चित्र हैं (72 नाम में 72px चौड़ाई निर्दिष्ट करती है) मैं कुछ jQuery लिखना चाहता हूं जो मुझे दो पंक्तियों में से किसी एक पंक्ति में दूसरे टीडी को क्लिक करने की इजाजत देता है, और उसी छवि के एक बड़े संस्करण के साथ उस पंक्ति में src छवि को प्रतिस्थापित करने के लिए, अर्थात, 72 की जगह 300 के साथ एक src नाम।

मेरी समस्या क्लिक किए गए td से उस टीडी के अंदर कच्चे आईएमजी नोड तक हो रही है। मैं इस के साथ खेल रहा हूं:

  $ ("td.bc_img")। क्लिक करें (फ़ंक्शन () {console.log ("1। यह है", यह); imgNode = $ ( यह) .फंड ('आईएमजी')। Get (); console.log ("2। आईआईजीएनोड है", आईआईजीएनओडी); console.log ("3। आईएमजीएनोडएसआरसी है", आईएमजीएनोड एसआरसी); var थंबएसआरसी =? ; // सुनिश्चित नहीं है कि कैसे इस var बड़ा imgSrc = thumbSrc.replace (/ _ 72 \ .jpg /, "_900.jpg");}) प्राप्त करने के लिए;   

और यह कंसोल आउटपुट का उत्पादन करता है:

कंसोल आउटपुट

लेकिन ऐसा लगता नहीं है कि मुझे क्या चाहिए। मुझे लगता है कि मुझे ऐसा कुछ करने की आवश्यकता है जो दिखता है:

  & lt; img class = "thumbnail" src = "उत्पाद छवियाँ / img_1893_72.jpg" & gt;   

इससे पहले कि मैं इसमें एसआरसी जोड़ूं और src को संशोधित कर सकूं।

किसी भी मदद के लिए धन्यवाद।

आपका चयनकर्ता तत्वों की एक सरणी लौट रहा है (नोटिफिक कंसोल पाठ के चारों ओर चौकोर ब्रैकेट देखें), जिसमें src संपत्ति नहीं है उस सरणी का पहला तत्व प्राप्त करें (या .get (0) का उपयोग करें, जो एक ही काम करता है):

  & gt; $ ( 'Img') मिलता है ()।; [आईएमजी] & gt; $ ( 'Img') मिल () [0]। & Lt; img src = "foo.jpg" / & gt; & Gt; $ ( 'Img') मिलता है (0)। & Lt; img src = "foo.jpg" / & gt;   

आप src को .attr ('src') का उपयोग कर jQuery के ऑब्जेक्ट से भी प्राप्त कर सकते हैं < / div>

ant - How to fetch files from a directory and execute them parallely 5 at a time -


I am using ant to fetch all the files in a directory and only 5 files are parallel and the next 5 to 5 I execute again. The file previously executed must not be executed again.

  & lt; Target name = "parallel test" description = "checking parallel test" & gt; Param = "file" & gt; For & lt; & Lt; Path & gt; & Lt; Fileset dir = "C: / RCBuild3 / k / bin / prd1" & gt; & Lt; Include name = "* .xml" /> & Lt; / Fileset & gt; & Lt; / Path & gt; & Lt; Sequential & gt; & Lt; Antalk target = "paralexactine" & gt; & Lt; Param name = "productfile" value = "@ {file}" /> & Lt; / Antcall & gt; & Lt; / Sequential & gt; & Lt; For / & gt; & Lt; / Target & gt; & Lt; Target name = "paralexactine" & gt; & Lt; Exec dir = "C: / RCBuild3 / k / bin /" executable = "CMD" & gt; & Lt; Arg value = "/ c" /> & Lt; Arg value = "productupload.bat" /> & Lt; Arg value = "- fileName" /> & Lt; Arg value = "$ {productfile}" /> & Lt; / Executive & gt; & Lt; / Target & gt;   

Executes the above code sequentially.

Code first:

  & lt; Fileset dir = "C: / RCBuild3 / ofs / bin / prd1" id = "src.files" & gt; & Lt; Include name = "* .xml" /> & Lt; / Fileset & gt; & Lt; Pathconvert pathsep = "," property = "file.list" refid = "src.files" /> & Lt; List = "$ {file.list}" delimiter = "," param = "file" parallel = "true" threadCount = "5" & gt; & Lt; Sequential & gt; & Lt; Antalk target = "paralexactine" & gt; & Lt; Param name = "productfile" value = "@ {file}" /> & Lt; / Antcall & gt; & Lt; / Sequential & gt; & Lt; For / & gt;   

Explain:

First of all, you create a fileset for all those files that need to be processed.

Then, use pathconvert to convert the file to the property "file.list": filename1.xml, filename2.xml, filename3.xml .

"file.list" will be divided into list by using a comma for the Java code of work (which hides behind your ant file) And loop through the list . For each element in the list , the loop body ( sequential part) will run

parallel indicates to run the loop body with multiple threads for the task, and threadcount at the same time The maximum number of threads running on

Therefore, parallel = true and threadcount = 5 , which you describe, works just as well: 5 files at one time.

c++ - calling a function to change int to binary -


I have a function that changes it to binary when calling from the main function It gives an error Binary: Identifier not found What's wrong with the code?

  #include & lt; Iostream & gt; using namespace std; Int main () {int dec; Cin & gt; & Gt; December; Binary (DEC); Return 0; } Zero binary (integer decimal) {int remainder; If (decimal & lt; = 1) {std :: cout & lt; & Lt; Decimal; Return; Remainder = decimal% 2; Binary (decimal & gt; 1); Std :: cout & lt; & Lt; remainder; }   

You implement either the binary function on the main or the prototype defined

PHP function to remove String without HTML tags in the given html -


मेरे पास एक html कोड है:

  & lt; a href = "#" & gt; Foo & lt; / a & gt; बार डमी स्ट्रिंग है & lt; p & gt; हैलो & lt; / p & gt;   

मुझे एक आउटपुट होना चाहते हैं

  & lt; a href = "#" & gt; foo & lt; / a & gt; & lt; p & gt; हैलो & lt; / p & gt ;   

मैं उपरोक्त परिणाम प्राप्त करने के लिए PHP कोड खोज रहा हूं। आउटपुट के लिए केवल HTML एम्बेड किए गए स्ट्रिंग फ़िल्टर करें मुझे पता है कि स्ट्रिप_टाग्स () फ़ंक्शन एचटीएमएल टैग्स को निकाल देगा और केवल स्ट्रिंग आउटपुट कर देगा।

आइए अपना html कोड लें $ Html में

  $ string = strip_tags ($ html); $ Final = str_replace ($ स्ट्रिंग, "", $ html);   

यह आपकी सहायता कर सकता है किसी ने उसी का उत्तर दिया और दुर्भाग्यवश उसने हटा दिया है

धन्यवाद

c# - Passing data to previous window form from another window form -


I am working on a window form in Visual Studio 2010. I am trying to refresh knowledge on C # and a database inquiry.

Description: [I am not working on an MDI form, but with many solutions in Visual Studio 2010 and with my local database in my solution]

I have several windows in my solution (Log-in form, main window form, and search form). When a user logs in, the main window appears on the form and the log-in form hides [data from the log-in form is sent to the main window form, which is used to access the database in other functions. Sorry - sorry for not putting this before the small detail] When a user presses a button in the main window form to search the database, a new look (search form) appears In the search form, the user can search the data in the database and select the data from the database.

Issue:

When the user wants to select some data from the database, how can I get stuck on passing the current form (search form) data in the main window form?

Any help in this is greatly appreciated. And to clarify things to everyone, it's not in any form of homework.

^ _ ^

You either add a property or a method to the mainframe You can call the example that represents your mainframes

in SearchForm:

  mainForm .SomeMethod (..) or mainFor.SomeProperty = val Or ... you can create a representative property for a method in your MainForm on search from that point. When the representative has been created, SearchForm will be appointed.   

Printing array in Perl -


I currently read fstab files, split perl scripts according to columns, and search for the word in each column I am For the longest time to display this all the pecic (I think) works, the problem I have is that it keeps printing the same length for every line which is not true. Example $ dev_parts prints 24, and $ labe_parts print 24 and so on ...

Below is my code.

  #! Use / usr / bin / perl strict; Print "file name: \ n"; My $ file_name = & lt; STDIN & gt; Open (IN, "$ file_name"); My @parts = split (/ \ s + /, $ file_name); Prefer my $ usr_file (& lt; IN & gt;) {chomp ($ usr_file); @ Equal = partition (/ \ s + /, $ usr_file); Push (@dev, $ parts [0]); Push (@label, $ parts [1]); Push (@tmpfs, $ parts [2]); Push (@makes, $ parts [3]); Push (@sysfs, $ parts [4]); Push (@proc, $ parts [5]); } Foreach $ dev_parts (@dev) {$ dev_length1 = Length ($ parts [$ dev_parts]); If ($ dev_length1> $ dev_length2) {$ dev_length2 = $ dev_length1; }} Print "is the longest word in the first line: $ dev_length2 \ n"; Foreign currency $ label_parse (@ labell) {$ label_text1 = length ($ parts [$ label_paras]); If ($ lab_lamp1> label $ lang 2) {$ label_length2 = $ Label_LANG1; }} Print "is the longest word in the first line: $ label_length2 \ n";    

Your code should be like this

  #! Use / usr / bin / perl strict; Use warnings; Use data: Dumper; Print "file name: \ n"; My $ file_name = & lt; STDIN & gt; Chomp ($ file_name); Open (FILE, "$ file_name") or $ d! My% colhash; While (& lt; FILE & gt;) {my $ col = 0; My @parts = split / \ s + /; Map {my $ lane = length ($ _); $ Col ++; If ($ colhash {$ col}} & lt; $ len) {$ colhash {$ col} = $ len; # Store the longest word length for each column}} @ Actually; } Print dumper (\% collage);    

python - cgi get submitted image data-url -


Sorry if this question is dumb. I changed a jqplot image to a data-url and sent it with a form. In the new page, I used the cgi.FieldStorage () to get the data-url submitted but nothing was found. So can someone give me some suggestions on my approach? Thanks!

I am using Python on Google App Engine

Input Page JavaScript

  var imgData = $ ('# chart1'). JqplotToImageStr ({}); $ ('& Lt; tr style = "display: none"> gt; & lt; td & gt; & lt; input type = "hidden" name = "extract1" & gt; & lt; / td & gt; ; & Lt; / tr & gt; ') .appendTo (' .getpdf ') .Fund (' Input '). Data (IMGData);   

Output page:

  def post (self): form = cgi.FieldStorage () extract1 = form.getvalue ('extract1') is # extract1 I tried to print the form and saw it as:  MiniFieldStorage ('extract1', '' data: image / png; base64, iVBORw0KGgoAAAANSUhE   

If I have assigned the data-url (Data: Image / PGG; Base64, IVBORKKKG ...), then it has worked.

I have a working code that does something similar.

  def post (Self): img_data = self.request.get ('extract1') # Close the bar prefix and change it from base 64   

What I am doing. cgi Opening in .FieldStorage is not something I usually did in the Python App Engine App.

git - How to track but not stage and how to unstage but not untrack? -


I have two short questions:

  • How can I track files but Without staging them?
  • How can I separate them from files for the undiscovered committee? Note: I know that I can make an initial commitment to track files and track my files from there Starting but what is particularly possible that I am asking above?

    I joined the git add-N & lt; Expr & gt; , but it tracks the file and adds it to:

      psc: \> gt; GIT add-n file A psc: \ & gt; Change to Git Status # Branch Master #: # (Use # GIT Reset Head & File; Use File) # # New File: FileA # # Not committed to changes: # ("Git add & lt; file & gt; ..." to be committed to what will be updated) # ("git checkout - " to discard changes in the work directory. .. ") # # Modified: README.md # modified: composer lock # modified: file a #   

    if i Not Reset git, then head of the file A or git rm - cached fileA it Anstojh but also Antrek file. This command git rm fileA suggests using flag-F which removes the file by mistake.

    Therefore, it is possible not only on the track but on the stage, and only unstable for unstable files?

    Update (May 2015)

    I tried Git add-n & lt; Expr & gt; to use, but it tracks the file and adds it to the commit:

    It is no longer with the upcoming Git 2.5 (Q2 2015) .


    Original Answer (March 2013)

    How can I destabilize them for unseen files?

    This is the official way:

      reset git HEAD file   

    but since this is a new file , You uncheck it properly (delete it from the index, referencing it in no time).

    Starting to track a file means that it should be placed in an index or commute.

    I would recommend creating a branch for those files, they have been sent there to add in order. Transposed files are files that were in the previous snapshot ; they can be unaffiliated, modified, or staged < Li> Untrecked files are everything else; Any file in your work directory that was not in your last snapshot and is not in your staging area (index)

    This means that, for a new file, it does not mean untreck it.

     Tracked files in git

    " ".

How to detect continuous shape in an image using PHP? -


I am trying to remove cyclic words from many different word-containing images.

For example, in this picture:

 The word

is the word" MAMBAHUNT "because it is orbiting should be removed.

extracted word

My strategy So far, there is a straight line in the image. Once I have straight lines, I can find their intersections to find the corners and remove the desired image.

The way I am trying to get straight lines, by looping it through every pixel and finding out how many of them have the same color in the row. However, he gives false positivity because some words meet this criteria.

Can I get straight lines in the image using PHP? Or a different strategy to remove the ringed words?

Is trying to adopt a captcha? :)

You can use the same algorithm to find all the white lines in the image and check each white line whether it is near a white line or not. When it is not; It is a false positive though not incredibly efficient.

c++ - Not able to see memory leak on console -


I am using Visual Studio 2010, try to use the CRT library provided by the VC for making leaking Of But I'm not able to see the memory leak printout on the console. Codebase: #include & lt; Iostream & gt; # Include & lt; Vector & gt; #define _CRTDBG_MAP_ALLOC #include & lt; Crtdbg.h & gt; #ifdef _DEBUG #define DEBUG_NEW new (_NORMAL_BLOCK, __FILE__, __LINE__) #define using new DEBUG_NEW #endif namespace std; Int main () {_CrtSetDbgFlag (_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF); Int Y = 1; Int x = 2; Int ** superevil = new int * [Y]; For (int i = 0; i

The reason can not be found.

Note that if you have set _CRTDBG_LEAK_CHECK_DF, then you _CrtDumpMemoryLeaks () _CrtDumpMemoryLeaks () , there was no leak yet .

In addition, it only works in the debug which runs through the IDE and output - if any - the dump is done in the output studio in the visual studio, not on the console.

If you remove the call at _CrtDumpMemoryLeaks () and run through the IDE, you will see something similar to the following (I used VS2012): < / P>

Detect Memory Leaks!
Dumping Objects - & gt;
c: \ consoleapplication1.cpp (24): {190} general block 0x004CCAF0, 8 bytes long.
Data: & lt; & Gt; CD CD CD CD CD CD CD CD: \ consoleapplication1.cpp (22): {18 9} general block 0x004 in CCC 0, 4 bytes long.
Data: & lt; L & gt; F.CA 4C 00 - Object Dump Complete

c++ - How to compare doubles with 5 digits of precision? -


I'm trying to compare 2 couple who came in [0.0, 1.0] Are there.

My task (taken from) -

  Inline bool is equal (double x, double y) {const double ipsilon = 0.000001; Return fibers (X - Y) & lt; Epsilon; }   

Usage -

  cerr & lt; & Lt; Acquel (1.000001, 1.000002) & lt; & Lt; Endl; Serie Lieutenant; & Lt; Acquel (1.000010, 1.000020) & lt; & Lt; Endl;   

Output is -

  0   

I hope the first true , Second to be false please tell me where I am going wrong and how to fix it?

1.000001 being restricted to normal 64-bit IEEE floating point presentation In 1.0000009999999999177333620536956004798412 . Similarly 1.000002 is actually 1.0000020000000000575113290324225090444087 . Apart from 0.000001 , both are slightly more slightly different.

You can use a slightly larger comparison value to catch it:

  const double eppsilon = 0.0000011;   

It is not possible to completely eliminate problems of any time with floating point numbers.

profiling - Monitor distribution of execution time of a java program -


I have a very long program with hundreds of methods, in my effort to increase the performance of the program, I took it in every method I want to monitor the time or want to see the loop, where should I start to customize the code.

Is there any eclipse plugin or software tool to do this? I mean that many lines of code are calculated without any method?

is an excellent profiler.

I usually run my code in a warm loop and attach it after raising the code, but it's OK to set a breakpoint in my code and even after that. Looks like you actually want visualvm, I use it to track performance constraints at least once in the code.

java - How to implement SSL on Apache 2.2 -


What is a step to configure SSL on Apache 2.2? I have searched and tried a lot of things but the configuration is not working.

Check these links This can be useful for your case

< / P>

from step



java - GWT 2.5.1 and IntelliJ debug mode, serializable exception -


I'm running IntelliJ 12.1 for a GWT project. I can not get GWT configuration to work, I'm getting a serialization exception.

I am using Maven and Tomt and I'm running Web App Project from Maven. Like I create a project / webpad from that directory and run a tomcat from that directory.

Error:

  java.lang.RuntimeException: com.google.gwt.user Client.rpc.IncompatibleRemoteServiceException: the response can not be deserialized  < / Pre> 

Here are my settings for GWT configuration:

  -noserver -port 8080 -logLevel DEBUG -war / User / Bibbon / Projects / SRC / Web / Target / My 13.06 .04 - SNAPSHOT - Startup URL http://127.0.0.1:8080/ Home.I   

Ironically, if I run remote debugging, example: < P> mvn gwt: debug -Dgwt.noserver = true

and then Launch remote debugging from IntelliJ (Do not use GWT mode), I get 't numbering error.

The class is a simple enum. I am creating a simple RPC service call and at the initial call, I get the top mistake:

  Implementation of the public sector status SerialJobs, Iscierable (running, disabled) < / Code>  

I tried to clear all the cache files and clean the target directory but I got the same error.

How can I run the IntelliJ GWT configuration without this error?

Try "text">

Try the mvn clean install on the whole project (but I hope you tried it ...) and mvn gwt: clean On the GWT part. Also delete compiled / temporary files in src / main / webapp /

And if this is actually the problem of IntelliJ cache, then try file - & gt; Invalid cache .

android - ArrayList gets clear after coming back from another activity -


This is strange because yesterday the code was working but not today. I'm pretty sure I did not change anything.

This is the thing that I have a blank array list for the first time, then I call another activity which will be a string for the previous activity that I add to the album.

The problem is that every time I start that new activity and it gives a new string, then my Aralist is empty, so I only see the last returned string. On my ListView

I tried something about SavaveInstanceState, but it did not help. any idea? Thank you. Array List & lt; String & gt; Rule = New Arreelist & lt; String & gt; (); @ Override protected void saved create (bundled Instansstet) {Suprknkret (saved Instensstet); SetContentView (R.layout.activity_add_filters); MyList = (ListView) findViewById (R.id.listFilters); Adapter = new array adapter & lt; String & gt; (This, android.R.layout.simple_list_item_1, rule); MyList.setAdapter (adapter); } @ Override Secure Void Activity Result (The result of int RequestCode, Int code, Intent data) {if (Requestcode == REQUEST_CODE_0 and Result Code == RESULT_OK} {string aux = data.getExtras () GetString (SRULE); Rules.add (aux); // Here rules.size () is always the 1 adapter.notifyDataSetChanged (); }}

Edit: I call other code with this code in a simple way

  intent I = new intent (this, activityAdru . category); StartActivityForResult (i, S.REQUEST_CODE_0);   

I return data from that other way in another way:

  intent = new intent (); String rule = some over operation (); I.putextra (SURULE, Rules); SetResult (RESULT_OK, i);    

your code looks ok Make sure setResult (RESULT_OK, i) is always called when another activity begins.

build - How to make Cygwin the default shell for Jenkins? -


I'm trying to come up with some smart solutions for a written build using SCONS, which Depending on the applications, to access the paths like Unix, using paths like Unix. However, when I'm trying to use the Ascans plugin or GIT plugin in Jenkins, then it will somehow cmd / c Git.exe - and it will definitely fail, because Git Sigwin And was known only in the Saigwin shell, but not in CMD. But even if I can make GIT and the rest are available for CMD.XA, then other problems arise: the Sagvivin version of the GIT expects a forward slash and the backward slash to escape In form Kickback issues related to the idiotic Windows file system (I can not allow Jenkins to delete my own files!).

So, Jenkins is the only way to use the signin shell, and never cmd.exe? Or should I be prepared to run some Linux in VM so that it is handled?

You can configure Jenkins to perform the sync command with a specific shell command as follows:

  c: \ cygwin \ bin \ minutely --hold always --exec / cygdrive / c / path / to / bash / Script.sh   

Where script.sh Jenkins will execute all the commands required for execution.

ios - How to show library selection option in UIImagePickerController -


I am using a simple default UIImagePickerController but I want to show the photo library option in the controller to UIMax such as iPhone / The normal camera in the iPod. I want the user default image picker with any overlayview. How do I enable it?

Thank you.

To implement this functionality, you must use a camera overlay if you are actually using the default apple < Code> UIImagePickerControllerSourceTypeCamera if you want 'Look'

There are so many resources to learn about your site: I uiimagepicker 's showCameraControls Property yes .

2. There is nothing else in your custom overlay file (.xib) album button and do whatever you want to do.

Hope this helps :)

jquery - ResponiveSlides Not Working - Any Browser -


I have not been able to work on any browser yet (Chrome, Firefox, Safari). I've used too much of the exact code from the site, but here's what I have:

In the header:

  & lt; Head & gt; & Lt; Link href = "main.css" rel = "stylesheet" media = "screen" type = "text / css" /> & Lt; Script src = "http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js" & gt; & Lt; / Script & gt; & Lt; Script src = "js / responsiveslides.min.js" & gt; & Lt; / Script & gt; & Lt; Script & gt; $ (Document) .ready (function () {$ (".lines"). Responsive slides ({auto: true, speed: 1000, maximity: 775});     

Immediately after the body:

  
    gt; & lt; img src = "image / slider / 1.png" /> gt; & lt P>
  • / P> * BEGIN Slideshow * / .lslsides {status: relative; list-style -p Lists: None; List-style-Position: Initial; List-Styles-Image: Initial; Overflow: HID: Width: 100%; Margin: 0; Padding: 0;} Rslides li {-webkit-backface-visibility: Hidden: Position: Full; Display: None: Width: 100%; Left: 0; Top: 0;} Rslides Li: First Child [Status: Relative; Display area; Swim left; }. Rlslides img {display: block; Height: auto; Swim left; Width: 100%; Border image: Initial; } / * END slideshow * /

    There is no answer about this. I believe I have the same problem - where only the first image is shown and the slideshow does not play.

    "itemprop =" text ">

    try it

      & lt; script & gt; $ (function () {$ (".lines"). Responsive slides ({Auto: true, speed: 1000, max width: 775});}); & lt; / Scripts & gt;   

    instead of $ (document).

python - Flask login together with client authentication methods for RESTful service -


Here's the position:

We use flasks for website application development. , We host a quiet service

Later, we find that we also need access, and we also need access to them, and we have certification tools Use the Web application for both use and lush service. Repeat with client calls (dragon), no session and cookies etc. This gives us a headache about the current authentication of lush service.

There are many ways to secure the conditional service on the Web, with client calls. But there is no easy way to get along with our current flask-login tool, as if we do not need to change our web application a lot.

So here's the question:

Is there an easy way (framework) so that the restible services can support many authentication methods (protocols) at the same time. Is this a good practice too?

Many thanks!

In modern web development (in my humble opinion), officially one of the most difficult questions is: Web authentication

Here is the principle behind it (I will answer your question in a moment).

When you create complicated users with more than a few users, especially if you are building apps that are both a website and an API service, then you always face the issue of authentication. What are you, 'are you doing again.

The ideal way to resolve these problems is to have a freelance writer on your network, some types of internal APIs that handle specially for user creation, editing and deletion. There are several advantages to doing this:

  • You have a single authentication source that can use all your application components: Use your website to log in behind people's views You can use it to authenticate your API service, API requests, etc.
  • You have the same service which can be manipulated by manipulative - it is very dangerous to implement a user's caching which usually occurs when you have multiple authentication Deals with methods: You can cache users for API service, but failing to cache them with the website, such problems cause problems).
  • Think about this as a single service that can be extended independently of your other components: Which part of the application data is used in comparison to any other application? In most applications, this user data will require user data for every request, and it puts stress on your database / cache / whatever you are doing. By making the same service that manages the user, it makes it very good for you to easily scale this part of the application stack.

    Overall, authentication is really hard.

    For the past two years I have been CTO in OpenCNAm, and we had the same problem (a website and API service). In order to handle our authentication properly, we ended up building an internal authentication service described above, then using flask-logging to authenticate users through the website, and authenticating users through the API A custom method to do (only one HTTP call for our athlete)

    This really works well for us, and we have thousands of requests By allowing billions (by straining each component in our stack and by focusing on the user object as separate service).

    Now, I will not recommend this for apps which Very simple, or such apps that do not have many users, because there is more trouble than this.

    If you are looking for a third-party solution, Stormpath looks very promising (just Do it Google).

    Anyhow, hope that helps! Good luck.

asp.net mvc 4 - MVC4 Default route when using areas -


I am trying to use the areas within the MVC app, I like that the default route is to the Home Controller Will be resolved within the admin area but it resolves the root controller on the home site. I added the namespace of the Admin Home Controller but it still solved the Root Home Controller.

My Route Config:

  Public class root config {public static zero registrations (Route quality path) {Routes.IgnoreRoute ("{resource} .Xd / {* pathInfo } "); ("Default", "{controller} / {action} / {id}", New {controller = "Home", Action = "Index", ID = UrlParameter.Optional}, New [] {"MvcApplicationAreas area. Controller "}); }}   

Administrator area route

  public class administratorArera registration: area registration {public override string area name {{return "administrator"; }} Public Override Blank Register Array {Arizona Registry} }); }}   

Home Controller - Admin Area

  Namespace MvcApplicationAreas.Areas.Admin.Controllers {Public Class HomeController: Controller {Public ActionResult Index} {Return View (); }}}   

Why do not any ideas get cured properly? Thank you

I have tested your code for field registration and it works and the right controller Selects. However, the visual resolution sees the view in the root folder, even if the correct controller is used.

To test, I used the following Home Index action in my home controller:

  Public Performance Index () {Return View (Model: "Admin Area home controller "); }   

then my index.chstml in / view / home:

  root view: @modal   

and Administrator area view: While running, the output is:

Route view: home admin in the admin area P> So the path runs the administrator administrator in the admin area, but then thew visual resolution runs and finds the root



centos - How to get Apache Server to display test page -


I'm trying to set up an Apache server on a CentOS 5.9 machine but when I get it, I do not see the page Go to my machine IP address on port 80 in my browser, Apache / httpd comes with preconcise compose and I have already made sure httpd service is running and NameVirtualHost *: 80 Has been deprecated in /etc/httpd/conf/httpd.conf , everything else is httpd.confdefault There is no error in the Httpd log on set and the service restarts ok. What am I doing wrong?

To verify whether the epa serving the default page, http: / / Local host . If you do not have a GUI, you can access your server with Curl localhost , which will print your layout on the HTML code of your default page.

If you are trying to access a remote machine on your server you should check whether the firewall is turned on and if port 80 is opened then iptables -vnl . If not, open it with iptables -A INPUT -p TCP-M State- state NEW -J ACCEPT

android - How to access gmail messages under labels that aren't visible to IMAP? -


Allows to disable specific labels in Gmail by showing them via IMAP. However, the Gmail Android app can access all the hidden labels from IPAP.

I am developing an Android email client and need equal access to messages under the hidden label from IMAP - How can I get this?

The IMAP command XLIST is supposed to return all the horoscopes.

By default, hiding a label means to hide folders on IAPAP, not label itself.

vba - Excel Macro to search folders and return files containing specific keyword and most recent version -


I'm looking for some help in writing a macro that is a folder in my computer for viewing in any file The folder will find a specified keyword, then return the file name, path and the last modified date to an Excel worksheet.

  REF folderPath REF fileName Final Codified FilePath Apple C: \ Fruit Carpet C: \ Vegetables Spinach C: \ Subgues   

For example (see above) ,

I will have keywords and folder paths in column A and B. A named file "Apple_v5.xls" in the folder named "Fruit", so I would like to search the macro for the keyword "Apple", then return the name, latest version and file path (Colonel D, E, F) in the same spreadsheet. Colonel C will only list those keywords in the AL macro again going down the list of keywords until it will reach the end.

It is that I have been in the internet since the research, but it did not work for some reason please help! Thanks!

  Private command command button 1_Click () as DDIP worksheet, RNG as RNG, LRG Long, FPAD = Sheets ("Sheet 2") as string set lstRw = sh.Cells (Find: = "*", later: = sh.Range ("A1"), LookAt: = xlPart, LookIn: = xlFormulas, SearchOrder: = xlByRows, Search Direction: = xl Previous, Match CAS: = False ). Set rng = sh.Range ("A2: A" and LCRR) I = 1 to 100 fpath = Sheets ("Sheet2"). Range ("B" & amp; i) If right (fPath, 1) & lt; & Gt; "\" Then fpath = fPath & amp; "\" End if FWB = Dir (FPS and "*. *") X = 2 while FWB & lt; & Gt; "" RCG INSAT (LCES (FWB), LCE (C. value)) in each C gt; 0 then worksheet ("sheet2"). Set the range ("C" and X) = FWB set fs = CreateObject ("Scripting.FileSystem Object") f = fs.GetFile (fWb) worksheets ("Sheet2"). Range ("E" ("E-2" encoder: "worksheet" ("Sheet 2"). Hyperlink Add Anchor: = Worksheet ("Sheet2"). Room (X, 2), Address: = F. Path column ("A: D"). Autofit set FS = nothing set F = nothing x = x + 1 end if next fWb = set the dot loop sh = nothing set rng = nothing next I can say sheets ( "Sheet 2"). Active End Sub    

with some code / layout here Some problems are essential for you Without rewriting the macro macro, this method can be used by you.

--- Get the range of cells that are your keywords (you already have your rng )

--- Set your line counter (you are already using the x variable to do this)

- - In the Loop category through each cell (you are already using R code for each C in the code)

Then in that loop ...

--- Get the file path from the B column (you already do this when setting your fpath variable )

--- Find the folder for the first file with the keyword using the following code

  fwb = Dir (fpath and c.value & ". * ")   

This takes your reference value and inserts it into the directory path. * *". * "It says that you want to return it to any file type (such as. Apple.txt, Apple.pdf, Apple.mp3)

- If the file is found, populate the date last time Modified, path, file name, and hyperlink (all of which you know how to do the rest, as is done by the rest of the code as well)

- Reset your file and filesystemboat variable ( f and fs )

Finally, outside of your loop, you have your other variable (i.e. sh , rng ) Hope this helps.

android - Card emulation via software NFC -


After reading a lot of questions, I decided to post it one. I have read that the stock version of Android does not support the API for card emulation. Apart from this, we can not write custom applications to secure the embedded element in NFC controllers due to the moves managed by Google / Samsung.

I need to simulate a card (amphires or disafer etc.). The option I can see is through the software. I have an ACR 122 U reader and I have tested that NFC P2P mode has worked fine with the Nexus-S.

1) I came to a site that said that the NFC controller (pn532) of the Nexus S can emulate a mifare 4k card if it is true, can I write the apdu command on this emulator card Am I (Maybe if I use a modified ROM like CyanogenMod)

2) Can I write an Android application that reads the backup commands sent by the reader and generates appropriate responses (if completed Not to the way, to some degree). To do this, I have discovered that we need to panaging Negates S cynagenmod. Has anyone tried to copy the card through this method?

I think this is possible because we have mobile applications from access control companies through which the doors can open.

Your search might have some facts:

  • NFC controller in Nexus S (and Galaxy Nexus, Nexus 7 and some other Android devices) PN 544
  • The card can be done by either the secure element connected to the NFC controller or the host device (= in this case Android device). Nexus S has a secure element that can be used for it (used in Google Wallet) Card emulation from the host device is not a feature of PN 544 NFC controller, although some claim that they have succeeded in working it Is of
  • You can remove your device and start the card emulation by a secure element and by following the instructions on it (it has not tried to do with the 4.x jb, but I believe it is now Also works).
  • Copying a MiPhera Classic card can be done by a secure element in the Nexus S, but the DESFire card is not supported by a host device not protected by a secure element in the Nexus S.
  • I have checked a similar dwarf product which uses card emulation to contact an NFC mobile device, using card reader / writer mode to communicate in order to access control card for. IMO, 2 are simple options: use P2P communication (Android beam) or use card emulation in the reader device (if it supports). All other options require things like router devices and custom roms, which are not future proofs and there is no possibility of translating into any real product.

android - Spinner values get doubled every time I click on the activity -


I'm using one piece activites in my activity is a spinner I set my adapter to this problem whenever I switch to that activity, spinner adds value. It actually adds the same value to the spinner without removing the previous one, how to solve it? My code is the following:

  increases the public class AddPackageFragment slice {see Routview; EditText packagename; Edit text package number; Spinner network; Checkbox sim1; Checkbox sim2; Radio group type; Radio group through; Add Button Package; Button job description; ArrayList & LT; String & gt; Network = New Arrestist & lt; String & gt; (); ArrayAdapter & LT; String & gt; Adapter; Reference Reference; @ Override Public View Crate View (LayoutInflator Inflator, View Group Container, Bundle Saved InstantState) {Routeview = Inflator.flat (R.Late.ad_package, container, falls); InitializeViews (); SetNetworks (); SetSpinner (); Return root view; } Zero initializeViews () {packageName = (EditText) rootView.findViewById (R.id.pName); PackageNumber = (edit text) rootView.findViewById (R.id.pNumber); Network = (Spinner) rootView.findViewById (R.id.networkS); Sim1 = (checkbox) rootView.findViewById (R.id.sim1); Sim2 = (checkbox) rootView.findViewById (R.id.sim2); Type = (radio group) Routview: FindVBIID (RID type group); Via = (radio group) RouteviewFindWebIID (Ridthrough Group); AddPackage = (button) rootView.findViewById (R.id.addPackage); ActDetails = (Button) rootView.findViewById (R.id.activationDetails); Context = getActivity (). GetApplicationContext (); AddPackage.setActivated (incorrect); ActDetails.setActivated (false); } Zero set networks () {networks.add ("Mobilink"); Networks.add ("telenor"); Networks.add ("Ufone"); Networks.add ("warid"); Networks.add ("Zong"); Network.add ("Add new"); } Zero set spinner () {adapter = new array adapter & lt; String & gt; (References, R.Lit.spinner_item, network); Network.setAdapter (zero); Network.setAdapter (adapter); }}    

to extend @demerge

piece Life cycle, if your onCreateView is said for more than one time, then you have to take into consideration and clear values ​​(or lists) accordingly.

piece life cycle

c# - how to convert bit datatype to varchar in sql -


How to change bit datatype into SQL in the worker?

I tried Cast

Note:

has been removed as CAST (Varchar (512))

But that does not work ....

Note: IsDeleted is a bit datatype and it is Varchar or Int

Assume this is MySQL, you can VARCHAR can not be cast on Acceptable types are shown; Those CONVERT functions are listed after the clarification.

You will enter CHAR (1) . For example:

  CAST (b'11 'AS CHAR (1))    

excel - Looping through all available autofilter criteria one at a time in vba -


I was wondering if there was a way to get all the different AutoFilter criteria in one list for each criteria , in the copy of the end and pasting each separate table which appears as a separate sheet such as it is turned on.

Ideally it will run n times:

  ActiveSheet.Range (AllRows) .AutoFilter field = 10, Criterion 1: = CritVariable   

Where N is the number of different variables.

I want to emphasize that how to copy and paste in the macro, but I was curious how to repeat all the different norms because the norms vary on the basis of day May be. If a list is not available then how would I go through the criteria again?

You can study and customize

  • I have an employee table in column J, starting with cell A5 with a list of office;
  • I
  • I deleting duplicates from below category W1;
  • Then I copy from G5 to the bottom (does not consider any blank space in this column's data);
  • The filtered data is taken (cut) until the new worksheet, which is named after the current office name (criteria);
  • After each advanced filter, cell W2 is removed, thereby increasing the value in W3, so that it can be used for next filter operation.

    This means that when you press Ctrl-End to go to the last-used cell, then more is required. You can find a way to resolve the matter if necessary;)

      sub SheetsFromFilter () Dim wsCurrent Worksheet dim wsNew Worksheet dim iLeft integer set wsCurrent = ActiveSheet Application.ScreenUpdating = false as for as the range (.. "G5", range ( "G5") and (xlDown)) copy range ( "W1") range ( "W1") CurrentRegion.RemoveDuplicates column: .. = 1, Header: = xlYes iLeft = Range ("W1") .coreant region. ROSCount - 1 while iLeft & gt; 0 wsCurrent.Range ("A5") CurrentRegion.AdvancedFilter xlFilterCopy, _wcsCurrent.Range. ("W1: W2"), wsCurrent.Range ("Z1") set wsNew = Worksheets.Add wsCurrent.Range ("Z1"). CurrentRegion.Cut wsNew.Range ( "A1") wsNew.Name = wsCurrent.Range ( "W2") value wsCurrent.Range ( "W2") Delete xlShiftUp iLeft = iLeft - .. 1 loop wsCurrent.Range ("W1"). Skip application. ScreenUpdating = True End Sub   

    BTW I do not intend to modify it for my specific file; It's something you should do (or give it to ;;)).

    BTW This can be done using the normal (rather advanced) filter. You still copy the columns and delete the duplicates.

    Added : Well, I felt motivated to get myself also with Autofilter:

      sub SheetsFromAutoFilter () as dim wsCurrent Worksheet set dim wsNew worksheet integer as dim iLeft wsCurrent = ActiveSheet Application.ScreenUpdating = false range ( "G5", range ( "G5"). End (xlDown )) In form of. Copy range ("W1".) Range ("W1") CurrentRegion.RemoveDuplicates column: = 1, Header:. = XlYes iLeft = Range ("W1") CurrentRegion.Rows.Count - 1 while Do iLeft & gt; 0 set wsNew = Worksheets.Add wsCurrent.Range ("A5") CurrentRegion .With the AutoFilter area: .. = 7, _ Criteria1: = wsCurrent.Range ( "W1") Offset (iLeft) .Value .Copy wsNew.Range ( "A1") offset wsNew.Name = wsCurrent.Range ( "W1") with Kotofiltr End (ILeft). Value iLeft = iLeft - 1 loop wsCurrent.Range ("W1"). CurrentRegion.Clear application.ScreenUpdating = True last sub   

    [Both processes can be improved by using defined names and some error handling / probes.]