[Solved] Multitier Architecture [closed]

I suggest that you read on how to ask a good question first Straight from Separation of concerns: design principle for separating a computer program into distinct sections, such that each section addresses a separate concern. I hope that you are not the developer taking over this project, because it seems like you have minimal … Read more

[Solved] Fibonacci series incorrectly [closed]

On your system, long is 32 bits. The largest positive integer it can hold is 4294967295. But 1836311903 + 2971215073 = 4807526976, which is larger, so it overflowed and you got 512559680 (which is 4807526976 – 4294967296). If you want to go past the 47th Fibonacci number, you’ll need a larger datatype or do multi-precision … Read more

[Solved] Error in program [closed]

It’s unclear what the problem is but your for loop doesnt over the letters in word as the termination condition is based on the empty List size passed to the buildAL method. Replace for (int i = 0; i < arr2.size(); i++) with for (int i = 0; i < word.length(); i++) { solved Error … Read more

[Solved] Simple Coding Problems

A solution: Scanner input = new Scanner(System.in); int l; // it should be int if read int l = input.nextInt(); if (l <= 30) { System.out.println(“40 Sinas”); } if (l > 30 && l < 50) { System.out.println(“55 Sinas”); } if (l > 50 && l < 100) { System.out.println(“70 Sinas”); } if (l >= … Read more

[Solved] C# while loop not functioning [closed]

You need to split it up into sections. First: Get positive number double i; double k; Console.Write(“What is your total income : “); while (!double.TryParse(Console.ReadLine(), out i) || i < 0) { if (i < 0) { Console.WriteLine(“Your income cannot be negative.”); } else { Console.WriteLine(“Enter your income as a whole-dollar numeric figure.”); } } … Read more

[Solved] How to save data in multiple files on python

Assuming you don’t care what the file names are, you could write each batch of messages to a new temp file, thus: import tempfile texts = some_function_grabbing_text() while texts: with tempfile.TemporaryFile() as fp: fp.write(texts) texts = some_function_grabbing_text() solved How to save data in multiple files on python

[Solved] What is a watchdog? [closed]

A watchdog is a mechanism that periodically tests whether a process or thread is running properly. If it’s not, it either restarts it or notifies an administrator, depending on the needs of the application. The details of how you implement this will depend on the application design. solved What is a watchdog? [closed]

[Solved] Identifying Unique Visits by Customer [closed]

You can use row_number() and conditional aggregation. Here is an exaple: select customerid, avg(sales) as avgsales, max(case when segnum = 1 then sales end) as sales_01, max(case when segnum = 2 then sales end) as sales_02, max(case when segnum = 3 then sales end) as sales_03 from (select t.*, row_number() over (partition by customerid order … Read more

[Solved] How to extract json api through go to extract stargazers_count of a repo?

Here is an example (completely neglecting error handling): request, _ := http.Get(“https://api.github.com/repos/openebs/openebs”) defer request.Body.Close() bytes, _ := ioutil.ReadAll(request.Body) var apiResponse struct { StargazersCount int `json:”stargazers_count”` } json.Unmarshal(bytes, &apiResponse) fmt.Println(apiResponse.StargazersCount) Playground 3 solved How to extract json api through go to extract stargazers_count of a repo?

[Solved] Function double in haskell

Here are a few hints foldAEB2 Nil Un Conc is the identity function foldAEB2 Nil Un Conc :: AEB2 a -> AEB2 a Un :: a -> AEB2 a \a -> Conc (Un a) (Un a) :: a -> AEB2 a 4 solved Function double in haskell

[Solved] INSERT INTO syntax error in c#

This should work: OleDbCommand cmd = new OleDbCommand(@”INSERT INTO tbbill(invoice,[datetime],custm,total,tax,grand) VALUES(” + Convert.ToInt32(txtinvoice.Text) + “,\”” + dateTimePicker1.Value.ToString(“yyyy/MMM/dd”) + “\”,\”” + Convert.ToString(txtcn.Text) + “\”,\”” + txtttl.Text + “\”,\”” + Convert.ToInt32(cmtax.Text) + “\”,\”” + txtgrdttl.Text + “\”)”, con); cmd.CommandType = CommandType.Text; cmd.ExecuteNonQuery(); con.Close(); EDIT: As stated by others, your query is still open to SQL injection. Dmitry’s … Read more

[Solved] Using $.post, $.ajax or AJAX properly in CodeIgniter to call a PHP script

Yes, you will need to put your file inside the libraries folder(if the class is separate from codeigniter or is shared among many controllers, if not a Model would suffice), then create a controller for it. class Ajax_Controller extends CI_Controller { public $statusCode = 200; public $response = array(); public function __construct() { parent::__construct(); if(!$this->is_ajax_request()){ … Read more