[Solved] Use two components from different layouts

What you want to do is have two separate activities, one to edit the text, and one to display it. The first one you want to set the layout to layout_main, and set a callback for the button. Inside the callback you want: final EditText text = (EditText)findViewById(R.id.broj1); Intent intent = new Intent(MainAct.this, NumGen.class); Bundle … Read more

[Solved] How can I add one month to change into the milliseconds?

I suggest: First, instead of your variables (fields?) year, month, day, hours and minutes just declare private LocalDate date; private LocalTime time; private long milliseconds; (Keep the milliseconds variable since you will want to have your result here.) In onDateSet assign a value to date in this way: date = LocalDate.of(selectedYear, selectedMonth + 1, selectedDate); … Read more

[Solved] Call method at set time when program is already running?

Use a System.Threading.Timers.Timer object; Run the timer starting the next instance of your desired time and every 24 thereafter. // TimerCallback object that wraps your method to call when timer elapses // (see end of answer) var tc = new TimerCallback(DoStuffAt1300Hours); // Tomorrow 2/25/14 at 1pm var dt = new DateTime(2014, 2, 25, 13, 0, … Read more

[Solved] Parse of .txt on ruby

You can use CSV for parsing files with separators, e.g.: require ‘csv’ CSV.foreach(‘your_file.txt’, col_sep: “\t”, headers: true).map do |row| row.to_h end #=> [{“purchaser”=>”João”, “name”=>”St”, “item”=>”R$20”, “description”=>”off” …}, # {“purchaser”=>”Amy”, “name”=>”Rd”, “item”=>”awesome”, “description”=>”of”, ..}, …] It seems like this data is ready to process. A more common way is using comma-separated value for files like this, … Read more

[Solved] Unrecognized selector sent to instance NSArrayM [closed]

Did you removed UITabBarController also from your .xib file in Interface Builder? Did you removed UITabBarController also from your .xib file in Interface Builder? Check if object – in your case NSDictionary is kind of it’s class and key is not null. For example: – (void)fetchedDataAlerta:(NSData *)responseData { NSError* error; NSLog(@”RESP register %@”, responseData); if(responseData … Read more

[Solved] Unable to scrape data from Internet using Android intents

Have you considered using an http framework for Android instead? It’s a lot less code and also runs the requests in the background. This example uses the loopj async client build.gradle: compile ‘com.loopj.android:android-async-http:1.4.9’ compile ‘cz.msebera.android:httpclient:4.4.1.2’ Test code: @Test public void parseHttp() throws Exception { AsyncHttpClient client = new AsyncHttpClient(); final CountDownLatch latch = new CountDownLatch(1); … Read more

[Solved] Need help Javascript validation input text and date [closed]

function validate() { //Make a selector pointing to your input first var myInput = document.getElementById(‘yourInputId’).value //Validate length: if (myInput.length >= 8) { //Check for age if (eval(myInput) >= 16) { alert(‘your input is ok!’); } else { alert(‘Minimum age is 16!’); } } else { alert(‘input too short!’); } } P.S.: For character exclusion you … Read more

[Solved] Error converting data type nvarchar to float

So I think your error is with your select statement. You are trying to perform calculations on nvarchar values. You either need to change the data types, or perform a Cast within your select statement. For example… CAST (lat AS float) A section from your select statement for example should be… ACOS( SIN( CAST ((@lat) … Read more

[Solved] mySQL data type for form elements

1) you will get string as the value of radio so it will be varchar type 2) for check boxes any one can have multiple values so you need to create a separate table(working_project) for this values( data type will be same as radio) and another table for mapping(user_working_project) user_working_project table will containing user id … Read more

[Solved] java.AWT – setSize() method

Take this code import java.awt.Frame; public class AwtPrac { private static void init(){ Frame fm = new Frame(“Java Programm”); fm.setTitle(“AwtPrac”); fm.setSize(300,300); fm.setVisible(true); } public static void main(String[] args) { init(); } } 3 solved java.AWT – setSize() method