/** * Return a lazy-implemented filtered view of this DataSet. * * @param where the filtering Closure * @return the view DataSet */ public DataSet findAll(Closure where) { return new DataSet(this, where); }
/** * Return a lazy-implemented re-ordered view of this DataSet. * * @param sort the ordering Closure * @return the view DataSet */ public DataSet sort(Closure sort) { return new DataSet(this, null, sort); }
public DataSet createView(Closure criteria) { return new DataSet(this, criteria); }
/** * Return a lazy-implemented reverse-ordered view of this DataSet. * * @return the view DataSet */ public DataSet reverse() { if (sort == null) { throw new GroovyRuntimeException("reverse() only allowed immediately after a sort()"); } return new DataSet(this); }
/** * Return a lazy-implemented filtered view of this DataSet. * * @param where the filtering Closure * @return the view DataSet */ public DataSet findAll(Closure where) { return new DataSet(this, where); }
/** * Return a lazy-implemented re-ordered view of this DataSet. * * @param sort the ordering Closure * @return the view DataSet */ public DataSet sort(Closure sort) { return new DataSet(this, null, sort); }
import org.jdesktop.dataset.DataSet; public class Main { public static void main(String[] args) { DataSet ds = new DataSet("ds"); } }
con.Open(); SqlDataAdapter mycommand2 = new SqlDataAdapter("select qid,title from globalq where title like '%" + TextBox1.Text + "%'", con); DataSet ds = new DataSet(); mycommand2.Fill(ds); askQ.DataSource = ds; askQ.DataBind(); con.Close(); //apply focus back to textbox TextBox1.Focus();
DataSet objectOne = new DataSet("Value1"); DataSet objectTwo = new DataSet("Value2"); ArrayList<DataSet> dataSetValues = new ArrayList<>(); dataSetValues.add(objectOne); dataSetValues.add(objectTwo); LetsMakeAnAdapter adapter = new LetsMakeAnAdapter(getActivity(),dataSetValues); listView.setAdapter(adapter);
protected void googleMap_Load(object sender, EventArgs e) { //Establishing SQL connection SqlConnection connStr = new SqlConnection(ConfigurationManager.ConnectionStrings["myConnectionString"].ConnectionString); connStr.Open();//Open the connection to Database //Generate the database query to fetch the content details SqlCommand cmd = new SqlCommand("select LAT,LON from DATA where ID=9", connStr); SqlDataAdapter sqlda = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); sqlda.Fill(ds); }
public DataSet reverse() { if (sort == null) { throw new GroovyRuntimeException("reverse() only allowed immediately after a sort()"); } return new DataSet(this); }
public DataSet reverse() { if (sort == null) { throw new GroovyRuntimeException("reverse() only allowed immediately after a sort()"); } return new DataSet(this); }
public DataSet reverse() { if (sort == null) { throw new GroovyRuntimeException("reverse() only allowed immediately after a sort()"); } return new DataSet(this); }
[WebMethod] [ScriptMethod(ResponseFormat = ResponseFormat.Json)] public static object getDataByDate(string days) { DataSet ds = new DataSet(); ds = getPatientVisitCount(DateTime.Today.ToString(), DateTime.Today.ToString())); string json = Newtonsoft.Json.JsonConvert.SerializeXmlNode(ds.GetXml()); return json; }
/** * Return a lazy-implemented reverse-ordered view of this DataSet. * * @return the view DataSet */ public DataSet reverse() { if (sort == null) { throw new GroovyRuntimeException("reverse() only allowed immediately after a sort()"); } return new DataSet(this); }
public class SomeActivity extends Activity { public void someMethodThatUsesDataSet(){ // Create a dataset object with some data you want the save and a context // The context we use here is 'this', this is the current instance of SomeActivity, // you absolutely need this, I think this is what you're doing wrong, // you can't use ctx here because that's not a known variable at this point DataSet example = new DataSet(this, "data you want to save"); // Tell Sugar to save this record in the database example.save(); } }
public DataSet reverse() { if (sort == null) { throw new GroovyRuntimeException("reverse() only allowed immediately after a sort()"); } return new DataSet(this); }
Random random = new Random(); DataSet dataSet = new DataSet(); IntSummaryStatistics stats = IntStream.generate(random::nextInt).limit(1000000) .peek(dataSet::addValue).summaryStatistics(); assertEquals(stats.getMax(), dataSet.getLargest()); assertEquals(stats.getAverage(), dataSet.getAverage()); ...
NeuralNetwork neuralNetwork = new Perceptron(2, 1); DataSet trainingSet = new DataSet(2, 1); trainingSet.addRow(new DataSetRow(new double[]{0, 0}, new double[]{0})); trainingSet.addRow(new DataSetRow(new double[]{0, 1}, new double[]{1})); trainingSet.addRow(new DataSetRow(new double[]{1, 0}, new double[]{1})); trainingSet.addRow(new DataSetRow(new double[]{1, 1}, new double[]{1})); neuralNetwork.learn(trainingSet); neuralNetwork.save("/tmp/or_perceptron.nnet");