Posts

i want to add intent in main activity -

You want to take the name of the person for the next activity and if the login is not ok, it will show the toast that it does not work And just show the toast. What should be included in the next activity and what is wrong with this code @Override protected void onCreate (bundled savedInstanceState) {super.onCreate (savedInstanceState ); SetContentView (R.layout.activity_main); Find the last edit text EText1 = (edit text) VVBID (RED Edit Text 1); Find the last edit text EText2 = (EditText) ViewById (R.id.editText2); Find the last button BTN1 = (button) VibibIID (R.B. button 1); . Btn1.setOnClickListener (New View.OnClickListener) {Public Zero onClick (see v) {String str = eText1.getText () toString (); String Log = "Malaica"; if (str == log) {intent = New intent (getApplicationContext (), FirstButton.class); intent.putExtra ("welcome", log in); else {toast TOS = Toast.makeText (getApplication (), "wrong", toast.LENGTH_SHORT); tos .show ();}}}); ...

sql - how to use truncate in CTE -

with tranecttect (Empid, name) as (truncatetest * choose from where Empid = 10) table truncatecte Truncate but this is showing an error: Wrong syntax near the keyword 'trunk' Please help me solve it ... Actually, TRUNCATE is a DDL operation, which means that all of the rows You can not delete the Some rows And leave the other rows in the table. And, the with section can be processed as inline view or a temporary table, therefore, there is no point in touching it. So, your query does not understand at all. If you want to remove some rows from a table, delete what it means, but because you have mixed subquery factory and small, the full question is invalid .

Xades4j and Base64 in EnvelopedXmlObject -

I tried putting the base 64 string in the object in EnvelopedXmlObject: DocumentBuilderFactory dbFactory = DocumentBuilderFactory newInstance (); DbFactory.setNamespaceAware (true); DocumentBuilder debugger = DBFTC NE DocumentBuilder (); Document document = dBuilder.newDocument (); String generated document = ...; BASE64Encoder encoder = new BASE64Encoder (); String generated document encoded = encoder.node (generated document .getBytes ("UTF-8")); Node node 1 = document. CreateTextNode (generated encoding document); Data ObjectDesk Data ObjectDisk = New EnvelopedXmlObject (node ​​1, "plain / text", "http://www.w3.org/2000/09/xmldsig#base64"); .... When I run this code in file.xml, then each row object "& amp; # 13; which produces an error with the decoding text When I add this line: node node 1 = document. CreateTextNode (encoded generated document); saveFile ("c: \ temp \\ Temp.xml" , Generated document encoded); String ...

php - How to get a wordpress post custom filed value and assign it to a variable? -

Image
I am creating a form that sends the details of the form to my email. My custom field is: My Function Php function getHotel_contact_number () {global $ wp_query; $ Postid = $ wp_query- & gt; Post- & gt; Id; $ GetHotel_contact_number = get_post_meta ($ postid, 'hotel_contact_number', true); $ GetHotel_contact_number; } and my form is: & lt; PHP $ errors = array (); If (isset ($ _ POST ["submit"])) {$ to = "myemail@email.com"; $ Theme = "this is my subject"; $ Hotels = meet (); $ Hotel_contact_nmbr = getHotel_contact_number (); Check out the $ header = array ('sender email'). '' & Gt; ';' // and make sure it is not a blank / empty string. If (empty ($ sender)) {// string down empty, Error Errors $ Error Adding $ Errors ['Sender User'] = "Please Enter Your Name!" If (empty ($ Sender Email)) {// empty string, error errors $ add errors $ errors ['Sender e-mail'] = ...

javascript - Change defaultPageTransition in jquery mobile 1.4.1? -

Is I want to know how to change jquery mobile slide the default page changes? I tried $ ("div [data-role = page]"). Bind ( "Pagebeforeshow", function (e, data) {console.log ( "the first page of ++++++++++ ++++++++++++++++ show") ; $ .mobile.silentScroll (0); $ .mobile.changePage.defaults.transition = 'Slide';}); and $ (document) .on ( "mobileinit", function () {// Apply overrides $ here ( "div [data-role = Page] "). Page Container (" Change ", {Infection:" Slide "}}}); But the two do not work Like this: $ (document) .on ( "mobileinit", function () {$ .extend ($ .mobile, {defaultPageTransition: 'slide'});});

java - Creating a text file and making it appear on desktop -

I've used this code to create an empty Tekstfail but it is only stored in the project folder I want to know How do I show the text file on the desktop? public void Nyafail Creator (string filename) {file OB = name of the new file (file + ".txt"); Boolean filecreated = false; Try {filecreated = ob.createNewFile (); } Hold (IOException e) {System.out.println ("error" + e); } If (filecreated = true) {System.out.println ("create an empty file" + ob.getPath ()); } Else {System.out.println ("Failed to create empty file" + ob.getPath ()); }} If you provide it to the directory path to the desktop, but also on the Depending on the system. For example, on my Linux machine, I ~ / Desktop can I when you do this, the / Do not forget to use // to avoid

terminal - How to keep column headers when using grep? -

Output of some programs starts with the names of columns (e.g., ps a ): $ ps a PID TTY STAT time COMMAND 1306 TTY1 SS + 0:00 / sbin / mingetty / dev / TTY1 1318 hvc0 ss + 0:00 / sbin / agetty hvc0 38400 vt100 -Nav 14,696 points / ss0: 00 -bash 15283 points / r + 00:00 ps a Now assume that I have frequencies of agetty Want to find: $ ps a | | Grep agetty 1318 hvc0 ss + 0:00 / sbin / agetty hvc0 38400 vt100- nav 15,339 points / s + 00:00 grapes agetty I have seen the beginning of ps Unless the output of a , I do not know what is the output of ps? Grep agetty means . I can print the first line after the matching lines: $ ps a | Head-N1; Ps a | Grep agetty pid TTY STAT time COMMAND 1318 hvc0 ss + 0:00 / sbin / agetty hvc0 38400 vt100- nav 15542 points / 0s + 00:00 grep agetty However, This does not solve my problem when I do not know how many header lines are there lines to get a header there and the method did not match the lines, or some less workaround is to...